contract_name stringlengths 1 61 | file_path stringlengths 5 50.4k | contract_address stringlengths 42 42 | language stringclasses 1
value | class_name stringlengths 1 61 | class_code stringlengths 4 330k | class_documentation stringlengths 0 29.1k | class_documentation_type stringclasses 6
values | func_name stringlengths 0 62 | func_code stringlengths 1 303k | func_documentation stringlengths 2 14.9k | func_documentation_type stringclasses 4
values | compiler_version stringlengths 15 42 | license_type stringclasses 14
values | swarm_source stringlengths 0 71 | meta dict | __index_level_0__ int64 0 60.4k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier o... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner {
require(newOwner != address(0));
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
548,
673
]
} | 1,500 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Haltable | contract Haltable is Ownable {
bool public halted;
event Halted(bool halted);
modifier stopInEmergency {
require(!halted);
_;
}
modifier onlyInEmergency {
require(halted);
_;
}
// called by the owner on emergency, triggers stopped state
function halt() external onlyOw... | /**
* Abstract contract that allows children to implement an
* emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.
*
*/ | NatSpecMultiLine | halt | function halt() external onlyOwner {
halted = true;
Halted(true);
}
| // called by the owner on emergency, triggers stopped state | LineComment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
287,
370
]
} | 1,501 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Haltable | contract Haltable is Ownable {
bool public halted;
event Halted(bool halted);
modifier stopInEmergency {
require(!halted);
_;
}
modifier onlyInEmergency {
require(halted);
_;
}
// called by the owner on emergency, triggers stopped state
function halt() external onlyOw... | /**
* Abstract contract that allows children to implement an
* emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.
*
*/ | NatSpecMultiLine | unhalt | function unhalt() external onlyOwner onlyInEmergency {
halted = false;
Halted(false);
}
| // called by the owner on end of emergency, returns to normal state | LineComment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
444,
547
]
} | 1,502 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
/**
* Obsolete. Removed this check based on:
* https://blog.coinfabrik.com/smart-contract-short-address-attack-mitigation-failure/
* @dev Fix for the ERC20 short address attack.
*
* modifier ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint _value) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
581,
832
]
} | 1,503 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
/**
* Obsolete. Removed this check based on:
* https://blog.coinfabrik.com/smart-contract-short-address-attack-mitigation-failure/
* @dev Fix for the ERC20 short address attack.
*
* modifier ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1036,
1149
]
} | 1,504 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | isToken | function isToken() public constant returns (bool weAre) {
return true;
}
| /* Interface declaration */ | Comment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
265,
348
]
} | 1,505 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint _value) public returns (bool success) {
uint _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require(_value <= _allowance);
// SafeMath uses assert inst... | /**
* @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 uint the amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
623,
1229
]
} | 1,506 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint _value) public returns (bool success) {
// To change the approve amount you first have to reduce the addresses'
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/e... | /**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1464,
2021
]
} | 1,507 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public constant returns (uint remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens than an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint specifing the amount of tokens still avaible for the spender.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2339,
2481
]
} | 1,508 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | addApproval | function addApproval(address _spender, uint _addedValue) public
returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = oldValue.add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* Atomic increment of approved spending
*
* Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2639,
2948
]
} | 1,509 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | StandardToken | contract StandardToken is BasicToken, ERC20 {
/* Token supply got increased and a new owner received these tokens */
event Minted(address receiver, uint amount);
mapping (address => mapping (address => uint)) allowed;
/* Interface declaration */
function isToken() public constant returns (bool weAr... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
*/ | NatSpecMultiLine | subApproval | function subApproval(address _spender, uint _subtractedValue) public
returns (bool success) {
uint oldVal = allowed[msg.sender][_spender];
if (_subtractedValue > oldVal) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldVal.sub(_subtractedValue);
... | /**
* Atomic decrement of approved spending.
*
* Works around https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
3101,
3535
]
} | 1,510 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | ReleasableToken | contract ReleasableToken is StandardToken, Ownable {
/* The finalizer contract that allows lifting the transfer limits on this token */
address public releaseAgent;
/** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/
bool public released ... | /**
* Define interface for releasing the token transfer after a successful crowdsale.
*/ | NatSpecMultiLine | setReleaseAgent | function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {
// We don't do interface check here as we might want to have a normal wallet address to act as a release agent.
releaseAgent = addr;
}
| /**
* Set the contract that can call release and make the token transferable.
*
* Since the owner of this contract is (or should be) the crowdsale,
* it can only be called by a corresponding exposed API in the crowdsale contract in case of input error.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
830,
1060
]
} | 1,511 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | ReleasableToken | contract ReleasableToken is StandardToken, Ownable {
/* The finalizer contract that allows lifting the transfer limits on this token */
address public releaseAgent;
/** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/
bool public released ... | /**
* Define interface for releasing the token transfer after a successful crowdsale.
*/ | NatSpecMultiLine | setTransferAgent | function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {
transferAgents[addr] = state;
}
| /**
* Owner can allow a particular address (e.g. a crowdsale contract) to transfer tokens despite the lock up period.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1195,
1330
]
} | 1,512 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | ReleasableToken | contract ReleasableToken is StandardToken, Ownable {
/* The finalizer contract that allows lifting the transfer limits on this token */
address public releaseAgent;
/** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/
bool public released ... | /**
* Define interface for releasing the token transfer after a successful crowdsale.
*/ | NatSpecMultiLine | releaseTokenTransfer | function releaseTokenTransfer() public onlyReleaseAgent {
released = true;
}
| /**
* One way function to release the tokens into the wild.
*
* Can be called only from the release agent that should typically be the finalize agent ICO contract.
* In the scope of the crowdsale, it is only called if the crowdsale has been a success (first milestone reached).
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1637,
1724
]
} | 1,513 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | ReleasableToken | contract ReleasableToken is StandardToken, Ownable {
/* The finalizer contract that allows lifting the transfer limits on this token */
address public releaseAgent;
/** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/
bool public released ... | /**
* Define interface for releasing the token transfer after a successful crowdsale.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint _value) public canTransfer(msg.sender) returns (bool success) {
// Call StandardToken.transfer()
return super.transfer(_to, _value);
}
| /** We restrict transfer by overriding it */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2309,
2494
]
} | 1,514 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | ReleasableToken | contract ReleasableToken is StandardToken, Ownable {
/* The finalizer contract that allows lifting the transfer limits on this token */
address public releaseAgent;
/** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/
bool public released ... | /**
* Define interface for releasing the token transfer after a successful crowdsale.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint _value) public canTransfer(_from) returns (bool success) {
// Call StandardToken.transferForm()
return super.transferFrom(_from, _to, _value);
}
| /** We restrict transferFrom by overriding it */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2549,
2764
]
} | 1,515 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
using SafeMath for uint;
bool public mintingFinished = false;
/** List of agents that are allowed to create new tokens */
mapping (address => bool) public mintAgents;
event MintingAgentChanged(address addr, bool state);
function MintableTo... | /**
* A token that can increase its supply by another contract.
*
* This allows uncapped crowdsale by dynamically increasing the supply when money pours in.
* Only mint agents, contracts whitelisted by owner, can mint new tokens.
*
*/ | NatSpecMultiLine | mint | function mint(address receiver, uint amount) onlyMintAgent public {
mintInternal(receiver, amount);
}
| /**
* Create new tokens and allocate them to an address.
*
* Only callable by a crowdsale contract (mint agent).
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
913,
1025
]
} | 1,516 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
using SafeMath for uint;
bool public mintingFinished = false;
/** List of agents that are allowed to create new tokens */
mapping (address => bool) public mintAgents;
event MintingAgentChanged(address addr, bool state);
function MintableTo... | /**
* A token that can increase its supply by another contract.
*
* This allows uncapped crowdsale by dynamically increasing the supply when money pours in.
* Only mint agents, contracts whitelisted by owner, can mint new tokens.
*
*/ | NatSpecMultiLine | setMintAgent | function setMintAgent(address addr, bool state) onlyOwner canMint public {
mintAgents[addr] = state;
MintingAgentChanged(addr, state);
}
| /**
* Owner can allow a crowdsale contract to mint new tokens.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1592,
1744
]
} | 1,517 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeAgent | contract UpgradeAgent {
/** This value should be the same as the original token's total supply */
uint public originalSupply;
/** Interface to ensure the contract is correctly configured */
function isUpgradeAgent() public constant returns (bool) {
return true;
}
/**
Upgrade an account
... | /**
* Upgrade agent transfers tokens to a new contract.
* Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.
*
* The Upgrade agent is the interface used to implement a token
* migration in the case of an emergency.
* The function upgradeFrom has to impleme... | NatSpecMultiLine | isUpgradeAgent | function isUpgradeAgent() public constant returns (bool) {
return true;
}
| /** Interface to ensure the contract is correctly configured */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
204,
288
]
} | 1,518 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeAgent | contract UpgradeAgent {
/** This value should be the same as the original token's total supply */
uint public originalSupply;
/** Interface to ensure the contract is correctly configured */
function isUpgradeAgent() public constant returns (bool) {
return true;
}
/**
Upgrade an account
... | /**
* Upgrade agent transfers tokens to a new contract.
* Upgrade agent itself can be the token contract, or just a middle man contract doing the heavy lifting.
*
* The Upgrade agent is the interface used to implement a token
* migration in the case of an emergency.
* The function upgradeFrom has to impleme... | NatSpecMultiLine | upgradeFrom | function upgradeFrom(address _from, uint _value) public;
| /**
Upgrade an account
When the token contract is in the upgrade status the each user will
have to call `upgrade(value)` function from UpgradeableToken.
The upgrade function adjust the balance of the user and the supply
of the previous token and then call `upgradeFrom(value)`.
The UpgradeAgent is t... | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
776,
835
]
} | 1,519 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | UpgradeableToken | function UpgradeableToken(address _upgradeMaster) {
setUpgradeMaster(_upgradeMaster);
}
| /**
* Do not allow construction without upgrade master set.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1203,
1301
]
} | 1,520 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | upgrade | function upgrade(uint value) public {
UpgradeState state = getUpgradeState();
// Ensure it's not called in a bad state
require(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading);
// Validate input value.
require(value != 0);
balances[msg.sender] = balances[msg.sender].sub(val... | /**
* Allow the token holder to upgrade some of their tokens to a new contract.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1398,
2016
]
} | 1,521 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | setUpgradeAgent | function setUpgradeAgent(address agent) external {
// Check whether the token is in a state that we could think of upgrading
require(canUpgrade());
require(agent != 0x0);
// Only a master can designate the next agent
require(msg.sender == upgradeMaster);
// Upgrade has already begun for an agent
... | /**
* Set an upgrade agent that handles the upgrade process
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2093,
2763
]
} | 1,522 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | getUpgradeState | function getUpgradeState() public constant returns(UpgradeState) {
if (!canUpgrade()) return UpgradeState.NotAllowed;
else if (address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
else if (totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
else return UpgradeState.Upgrading;
}
| /**
* Get the state of the token upgrade.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
2822,
3145
]
} | 1,523 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | changeUpgradeMaster | function changeUpgradeMaster(address new_master) public {
require(msg.sender == upgradeMaster);
setUpgradeMaster(new_master);
}
| /**
* Change the upgrade master.
*
* This allows us to set a new owner for the upgrade mechanism.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
3268,
3411
]
} | 1,524 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | setUpgradeMaster | function setUpgradeMaster(address new_master) private {
require(new_master != 0x0);
upgradeMaster = new_master;
}
| /**
* Internal upgrade master setter.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
3466,
3595
]
} | 1,525 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | UpgradeableToken | contract UpgradeableToken is StandardToken {
/** Contract / person who can set the upgrade path. This can be the same as team multisig wallet, as what it is with its default value. */
address public upgradeMaster;
/** The next contract where the tokens will be migrated. */
UpgradeAgent public upgradeAge... | /**
* A token upgrade mechanism where users can opt-in amount of tokens to the next smart contract revision.
*
*/ | NatSpecMultiLine | canUpgrade | function canUpgrade() public constant returns(bool) {
return true;
}
| /**
* Child contract can enable to provide the condition when the upgrade can begin.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
3697,
3777
]
} | 1,526 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CrowdsaleToken | contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken, FractionalERC20 {
event UpdatedTokenInformation(string newName, string newSymbol);
string public name;
string public symbol;
/**
* Construct the token.
*
* This token must be created through a team multisig wall... | /**
* A crowdsale token.
*
* An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
*
* - The token transfer() is disabled until the crowdsale is over
* - The token contract gives an opt-in upgrade path to a new contract
* - The same token can be part o... | NatSpecMultiLine | CrowdsaleToken | function CrowdsaleToken(string _name, string _symbol, uint _initialSupply, uint8 _decimals, address _multisig, bool _mintable)
UpgradeableToken(_multisig) MintableToken(_initialSupply, _multisig, _mintable) {
name = _name;
symbol = _symbol;
decimals = _decimals;
}
| /**
* Construct the token.
*
* This token must be created through a team multisig wallet, so that it is owned by that wallet.
*
* @param _name Token name
* @param _symbol Token symbol - typically it's all caps
* @param _initialSupply How many tokens we start with
* @param _decimals Number of decimal pla... | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
751,
1041
]
} | 1,527 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CrowdsaleToken | contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken, FractionalERC20 {
event UpdatedTokenInformation(string newName, string newSymbol);
string public name;
string public symbol;
/**
* Construct the token.
*
* This token must be created through a team multisig wall... | /**
* A crowdsale token.
*
* An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
*
* - The token transfer() is disabled until the crowdsale is over
* - The token contract gives an opt-in upgrade path to a new contract
* - The same token can be part o... | NatSpecMultiLine | releaseTokenTransfer | function releaseTokenTransfer() public onlyReleaseAgent {
mintingFinished = true;
super.releaseTokenTransfer();
}
| /**
* When token is released to be transferable, prohibit new token creation.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1136,
1265
]
} | 1,528 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CrowdsaleToken | contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken, FractionalERC20 {
event UpdatedTokenInformation(string newName, string newSymbol);
string public name;
string public symbol;
/**
* Construct the token.
*
* This token must be created through a team multisig wall... | /**
* A crowdsale token.
*
* An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
*
* - The token transfer() is disabled until the crowdsale is over
* - The token contract gives an opt-in upgrade path to a new contract
* - The same token can be part o... | NatSpecMultiLine | canUpgrade | function canUpgrade() public constant returns(bool) {
return released && super.canUpgrade();
}
| /**
* Allow upgrade agent functionality to kick in only if the crowdsale was a success.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1370,
1475
]
} | 1,529 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CrowdsaleToken | contract CrowdsaleToken is ReleasableToken, MintableToken, UpgradeableToken, FractionalERC20 {
event UpdatedTokenInformation(string newName, string newSymbol);
string public name;
string public symbol;
/**
* Construct the token.
*
* This token must be created through a team multisig wall... | /**
* A crowdsale token.
*
* An ERC-20 token designed specifically for crowdsales with investor protection and further development path.
*
* - The token transfer() is disabled until the crowdsale is over
* - The token contract gives an opt-in upgrade path to a new contract
* - The same token can be part o... | NatSpecMultiLine | setTokenInformation | function setTokenInformation(string _name, string _symbol) onlyOwner {
name = _name;
symbol = _symbol;
UpdatedTokenInformation(name, symbol);
}
| /**
* Owner can update token information here
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1538,
1704
]
} | 1,530 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | function() payable {
require(false);
}
| /**
* Don't expect to just send in money and get tokens.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
3783,
3832
]
} | 1,531 | ||
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | investInternal | function investInternal(address receiver, uint128 customerId) stopInEmergency notFinished private {
// Determine if it's a good time to accept investment from this participant
if (getState() == State.PreFunding) {
// Are we whitelisted for early deposit
require(earlyParticipantWhitelist[receiver]);
}... | /**
* Make an investment.
*
* Crowdsale must be running for one to invest.
* We must have not pressed the emergency brake.
*
* @param receiver The Ethereum address who receives the tokens
* @param customerId (optional) UUID v4 to track the successful payments on the server side
*
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
4158,
5232
]
} | 1,532 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | preallocate | function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner notFinished {
require(receiver != address(0));
uint tokenAmount = fullTokens.mul(10**uint(token.decimals()));
require(tokenAmount != 0);
uint weiAmount = weiPrice.mul(tokenAmount); // This can also be 0, in which case we... | /**
* Preallocate tokens for the early investors.
*
* Preallocated tokens have been sold before the actual crowdsale opens.
* This function mints the tokens and moves the crowdsale needle.
*
* No money is exchanged, as the crowdsale team already have received the payment.
*
* @param fullTokens tokens as... | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
5692,
6117
]
} | 1,533 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | updateInvestorFunds | function updateInvestorFunds(uint tokenAmount, uint weiAmount, address receiver, uint128 customerId) private {
// Update investor
investedAmountOf[receiver] = investedAmountOf[receiver].add(weiAmount);
tokenAmountOf[receiver] = tokenAmountOf[receiver].add(tokenAmount);
// Update totals
weiRaised = weiR... | /**
* Private function to update accounting in the crowdsale.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
6196,
6770
]
} | 1,534 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setFundingCap | function setFundingCap(uint newCap) public onlyOwner notFinished {
weiFundingCap = ceilingStrategy.relaxFundingCap(newCap, weiRaised);
require(weiFundingCap >= minimumFundingGoal);
FundingCapSet(weiFundingCap);
}
| /**
* Allow the owner to set a funding cap on the crowdsale.
* The new cap should be higher than the minimum funding goal.
*
* @param newCap minimum target cap that may be relaxed if it was already broken.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
7008,
7241
]
} | 1,535 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | buyWithCustomerId | function buyWithCustomerId(uint128 customerId) public payable {
require(customerId != 0); // UUIDv4 sanity check
investInternal(msg.sender, customerId);
}
| /**
* Invest to tokens, recognize the payer.
*
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
7309,
7480
]
} | 1,536 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | buy | function buy() public payable {
require(!requireCustomerId); // Crowdsale needs to track participants for thank you email
investInternal(msg.sender, 0);
}
| /**
* The basic entry point to participate in the crowdsale process.
*
* Pay for funding, get invested tokens back in the sender address.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
7643,
7813
]
} | 1,537 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | finalize | function finalize() public inState(State.Success) onlyOwner stopInEmergency {
finalizeAgent.finalizeCrowdsale(token);
finalized = true;
Finalized();
}
| /**
* Finalize a succcesful crowdsale.
*
* The owner can trigger a call the contract that provides post-crowdsale actions, like releasing the tokens.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
7988,
8159
]
} | 1,538 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setRequireCustomerId | function setRequireCustomerId(bool value) public onlyOwner stopInEmergency {
requireCustomerId = value;
InvestmentPolicyChanged(requireCustomerId);
}
| /**
* Set policy do we need to have server-side customer ids for the investments.
*
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
8264,
8429
]
} | 1,539 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setEarlyParticipantWhitelist | function setEarlyParticipantWhitelist(address addr, bool status) public onlyOwner notFinished stopInEmergency {
earlyParticipantWhitelist[addr] = status;
Whitelisted(addr, status);
}
| /**
* Allow addresses to do early participation.
*
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
8501,
8699
]
} | 1,540 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setPricingStrategy | function setPricingStrategy(PricingStrategy addr) internal {
// Disallow setting a bad agent
require(addr.isPricingStrategy());
pricingStrategy = addr;
}
| /**
* Allow to (re)set pricing strategy.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
8757,
8931
]
} | 1,541 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setCeilingStrategy | function setCeilingStrategy(CeilingStrategy addr) internal {
// Disallow setting a bad agent
require(addr.isCeilingStrategy());
ceilingStrategy = addr;
}
| /**
* Allow to (re)set ceiling strategy.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
8989,
9163
]
} | 1,542 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setFinalizeAgent | function setFinalizeAgent(FinalizeAgent addr) internal {
// Disallow setting a bad agent
require(addr.isFinalizeAgent());
finalizeAgent = addr;
require(isFinalizerSane());
}
| /**
* Allow to (re)set finalize agent.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
9219,
9418
]
} | 1,543 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setMultisig | function setMultisig(address addr) internal {
require(addr != 0);
multisigWallet = addr;
}
| /**
* Internal setter for the multisig wallet
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
9481,
9587
]
} | 1,544 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | loadRefund | function loadRefund() public payable inState(State.Failure) stopInEmergency {
require(msg.value >= weiRaised);
require(weiRefunded == 0);
uint excedent = msg.value.sub(weiRaised);
loadedRefund = loadedRefund.add(msg.value.sub(excedent));
investedAmountOf[msg.sender].add(excedent);
}
| /**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case that the minimum goal was not reached.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
9791,
10105
]
} | 1,545 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | refund | function refund() public inState(State.Refunding) stopInEmergency {
uint weiValue = investedAmountOf[msg.sender];
require(weiValue != 0);
investedAmountOf[msg.sender] = 0;
weiRefunded = weiRefunded.add(weiValue);
Refund(msg.sender, weiValue);
msg.sender.transfer(weiValue);
}
| /**
* Investors can claim refund.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
10156,
10467
]
} | 1,546 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | isMinimumGoalReached | function isMinimumGoalReached() public constant returns (bool reached) {
return weiRaised >= minimumFundingGoal;
}
| /**
* @return true if the crowdsale has raised enough money to be a success
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
10560,
10685
]
} | 1,547 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | isFinalizerSane | function isFinalizerSane() public constant returns (bool sane) {
return finalizeAgent.isSane(token);
}
| /**
* Check if the contract relationship looks good.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
10755,
10868
]
} | 1,548 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | getState | function getState() public constant returns (State) {
if (finalized) return State.Finalized;
else if (block.number < startsAt) return State.PreFunding;
else if (block.number <= endsAt && !ceilingStrategy.isCrowdsaleFull(weiRaised, weiFundingCap)) return State.Funding;
else if (isMinimumGoalReached()) return... | /**
* Crowdfund state machine management.
*
* This function has the timed transition builtin.
* So there is no chance of the variable being stale.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
11044,
11536
]
} | 1,549 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | setOwnerTestValue | function setOwnerTestValue(uint8 val) public onlyOwner stopInEmergency {
ownerTestValue = val;
}
| /** This is for manual testing of multisig wallet interaction */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
11607,
11714
]
} | 1,550 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | Crowdsale | contract Crowdsale is Haltable {
using SafeMath for uint;
/* The token we are selling */
CrowdsaleToken public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* How we are going to limit our offering */
CeilingStrategy public ceilingStrategy;
... | /**
* Abstract base contract for token sales.
*
* Handles
* - start and end dates
* - accepting investments
* - minimum funding goal and refund
* - various statistics during the crowdfund
* - different pricing strategies
* - different investment policies (require server side customer id, allow only wh... | NatSpecMultiLine | isCrowdsale | function isCrowdsale() public constant returns (bool) {
return true;
}
| /** Interface marker. */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
11863,
11944
]
} | 1,551 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | PricingStrategy | contract PricingStrategy {
/** Interface declaration. */
function isPricingStrategy() public constant returns (bool) {
return true;
}
/**
* When somebody tries to buy tokens for X eth, calculate how many tokens they get.
*
*
* @param value - What is the value of the transaction sent... | /**
* Interface for defining crowdsale pricing.
*/ | NatSpecMultiLine | isPricingStrategy | function isPricingStrategy() public constant returns (bool) {
return true;
}
| /** Interface declaration. */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
63,
150
]
} | 1,552 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | PricingStrategy | contract PricingStrategy {
/** Interface declaration. */
function isPricingStrategy() public constant returns (bool) {
return true;
}
/**
* When somebody tries to buy tokens for X eth, calculate how many tokens they get.
*
*
* @param value - What is the value of the transaction sent... | /**
* Interface for defining crowdsale pricing.
*/ | NatSpecMultiLine | calculatePrice | function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);
| /**
* When somebody tries to buy tokens for X eth, calculate how many tokens they get.
*
*
* @param value - What is the value of the transaction sent in as wei
* @param weiRaised - how much money has been raised this far
* @param tokensSold - how many tokens have been sold this far
* @param msgSender - wh... | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
649,
798
]
} | 1,553 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | FlatPricing | contract FlatPricing is PricingStrategy {
using SafeMath for uint;
/* How many weis one token costs */
uint public oneTokenInWei;
function FlatPricing(uint _oneTokenInWei) {
oneTokenInWei = _oneTokenInWei;
}
/**
* Calculate the current price for buy in amount.
*
* @ param {ui... | /**
* Fixed crowdsale pricing - everybody gets the same price.
*/ | NatSpecMultiLine | calculatePrice | function calculatePrice(uint value, uint, uint, address, uint decimals) public constant returns (uint) {
uint multiplier = 10 ** decimals;
return value.mul(multiplier).div(oneTokenInWei);
}
| /**
* Calculate the current price for buy in amount.
*
* @ param {uint value} Buy-in value in wei.
* @ param
* @ param
* @ param
* @ param {uint decimals} The decimals used by the token representation (e.g. given by FractionalERC20).
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
511,
716
]
} | 1,554 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CeilingStrategy | contract CeilingStrategy {
/** Interface declaration. */
function isCeilingStrategy() public constant returns (bool) {
return true;
}
/**
* When somebody tries to buy tokens for X wei, calculate how many weis they are allowed to use.
*
*
* @param _value - What is the value of the tr... | /**
* Interface for defining crowdsale ceiling.
*/ | NatSpecMultiLine | isCeilingStrategy | function isCeilingStrategy() public constant returns (bool) {
return true;
}
| /** Interface declaration. */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
63,
150
]
} | 1,555 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CeilingStrategy | contract CeilingStrategy {
/** Interface declaration. */
function isCeilingStrategy() public constant returns (bool) {
return true;
}
/**
* When somebody tries to buy tokens for X wei, calculate how many weis they are allowed to use.
*
*
* @param _value - What is the value of the tr... | /**
* Interface for defining crowdsale ceiling.
*/ | NatSpecMultiLine | weiAllowedToReceive | function weiAllowedToReceive(uint _value, uint _weiRaised, uint _weiInvestedBySender, uint _weiFundingCap) public constant returns (uint amount);
| /**
* When somebody tries to buy tokens for X wei, calculate how many weis they are allowed to use.
*
*
* @param _value - What is the value of the transaction sent in as wei.
* @param _weiRaised - How much money has been raised so far.
* @param _weiInvestedBySender - the investment made by the address that ... | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
708,
856
]
} | 1,556 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | CeilingStrategy | contract CeilingStrategy {
/** Interface declaration. */
function isCeilingStrategy() public constant returns (bool) {
return true;
}
/**
* When somebody tries to buy tokens for X wei, calculate how many weis they are allowed to use.
*
*
* @param _value - What is the value of the tr... | /**
* Interface for defining crowdsale ceiling.
*/ | NatSpecMultiLine | relaxFundingCap | function relaxFundingCap(uint _newCap, uint _weiRaised) public constant returns (uint);
| /**
* Calculate a new cap if the provided one is not above the amount already raised.
*
*
* @param _newCap - The potential new cap.
* @param _weiRaised - How much money has been raised so far.
* @return The adjusted cap.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1214,
1304
]
} | 1,557 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | FixedCeiling | contract FixedCeiling is CeilingStrategy {
using SafeMath for uint;
/* When relaxing a cap is necessary, we use this multiple to determine the relaxed cap */
uint public chunkedWeiMultiple;
/* The limit an individual address can invest */
uint public weiLimitPerAddress;
function FixedC... | /**
* Fixed cap investment per address and crowdsale
*/ | NatSpecMultiLine | relaxFundingCap | function relaxFundingCap(uint newCap, uint weiRaised) public constant returns (uint) {
if (newCap > weiRaised) return newCap;
else return weiRaised.div(chunkedWeiMultiple).add(1).mul(chunkedWeiMultiple);
}
| /* If the new target cap has not been reached yet, it's fine as it is */ | Comment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1354,
1587
]
} | 1,558 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | FinalizeAgent | contract FinalizeAgent {
function isFinalizeAgent() public constant returns(bool) {
return true;
}
/** Return true if we can run finalizeCrowdsale() properly.
*
* This is a safety check function that doesn't allow crowdsale to begin
* unless the finalizer has been set up properly.
*/
... | /**
* Finalize agent defines what happens at the end of a succesful crowdsale.
*
* - Allocate tokens for founders, bounties and community
* - Make tokens transferable
* - etc.
*/ | NatSpecMultiLine | isSane | function isSane(CrowdsaleToken token) public constant returns (bool);
| /** Return true if we can run finalizeCrowdsale() properly.
*
* This is a safety check function that doesn't allow crowdsale to begin
* unless the finalizer has been set up properly.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
320,
392
]
} | 1,559 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | FinalizeAgent | contract FinalizeAgent {
function isFinalizeAgent() public constant returns(bool) {
return true;
}
/** Return true if we can run finalizeCrowdsale() properly.
*
* This is a safety check function that doesn't allow crowdsale to begin
* unless the finalizer has been set up properly.
*/
... | /**
* Finalize agent defines what happens at the end of a succesful crowdsale.
*
* - Allocate tokens for founders, bounties and community
* - Make tokens transferable
* - etc.
*/ | NatSpecMultiLine | finalizeCrowdsale | function finalizeCrowdsale(CrowdsaleToken token) public;
| /** Called once by crowdsale finalize() if the sale was a success. */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
468,
527
]
} | 1,560 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | BonusFinalizeAgent | contract BonusFinalizeAgent is FinalizeAgent {
using SafeMath for uint;
Crowdsale public crowdsale;
/** Total percent of tokens minted to the team at the end of the sale as base points
bonus tokens = tokensSold * bonusBasePoints * 0.0001 */
uint public bonusBasePoints;
/** Implementati... | /**
* At the end of the successful crowdsale allocate % bonus of tokens to the team.
*
* Unlock tokens.
*
* BonusAllocationFinal must be set as the minting agent for the MintableToken.
*
*/ | NatSpecMultiLine | isSane | function isSane(CrowdsaleToken token) public constant returns (bool) {
return token.mintAgents(address(this)) && token.releaseAgent() == address(this);
}
| /* Can we run finalize properly */ | Comment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
921,
1085
]
} | 1,561 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | BonusFinalizeAgent | contract BonusFinalizeAgent is FinalizeAgent {
using SafeMath for uint;
Crowdsale public crowdsale;
/** Total percent of tokens minted to the team at the end of the sale as base points
bonus tokens = tokensSold * bonusBasePoints * 0.0001 */
uint public bonusBasePoints;
/** Implementati... | /**
* At the end of the successful crowdsale allocate % bonus of tokens to the team.
*
* Unlock tokens.
*
* BonusAllocationFinal must be set as the minting agent for the MintableToken.
*
*/ | NatSpecMultiLine | finalizeCrowdsale | function finalizeCrowdsale(CrowdsaleToken token) {
require(msg.sender == address(crowdsale));
// How many % points of tokens the founders and others get
uint tokensSold = crowdsale.tokensSold();
uint saleBasePoints = basePointsDivisor.sub(bonusBasePoints);
allocatedBonus = tokensSold.mul(bonusBasePoint... | /** Called once by crowdsale finalize() if the sale was a success. */ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1161,
1688
]
} | 1,562 | |
HubiiCrowdsale | HubiiCrowdsale.sol | 0xb9aac097f4dadcd6f06761eb470346415ef28d5a | Solidity | HubiiCrowdsale | contract HubiiCrowdsale is Crowdsale {
uint private constant chunked_multiple = 18000 * (10 ** 18); // in wei
uint private constant limit_per_address = 100000 * (10 ** 18); // in wei
uint private constant hubii_minimum_funding = 17000 * (10 ** 18); // in wei
uint private constant token_initial_suppl... | // This contract has the sole objective of providing a sane concrete instance of the Crowdsale contract. | LineComment | setStartingBlock | function setStartingBlock(uint startingBlock) public onlyOwner inState(State.PreFunding) {
require(startingBlock > block.number && startingBlock < endsAt);
startsAt = startingBlock;
}
| // These two setters are present only to correct block numbers if they are off from their target date by more than, say, a day | LineComment | v0.4.13+commit.fb4cb1a | bzzr://81828f9ae489ed77919587782a892cfe871396b934c3819f5804c4d9732b6c1e | {
"func_code_index": [
1762,
1973
]
} | 1,563 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://gith... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mul | function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
uint... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
90,
493
]
} | 1,564 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://gith... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
require(_b > 0); // Solidity only automatically asserts when dividing by 0
uint256 c = _a / _b;
// assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
605,
893
]
} | 1,565 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://gith... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
require(_b <= _a);
uint256 c = _a - _b;
return c;
}
| /**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
1008,
1153
]
} | 1,566 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://gith... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a + _b;
require(c >= _a);
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
1218,
1362
]
} | 1,567 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://gith... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
1497,
1614
]
} | 1,568 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
281,
369
]
} | 1,569 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances_[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
575,
680
]
} | 1,570 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
return allowed_[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
1004,
1170
]
} | 1,571 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_value <= balances_[msg.sender]);
require(_to != address(0));
balances_[msg.sender] = balances_[msg.sender].sub(_value);
balances_[_to] = balances_[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}... | /**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
1328,
1665
]
} | 1,572 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed_[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
2291,
2487
]
} | 1,573 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_value <= balances_[_from]);
require(_value <= allowed_[_from][msg.sender]);
require(_to != address(0));
balances_[_from] = balances_[_from].sub(_value);
balances_[_to] = balances_[_to].... | /**
* @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
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
2767,
3265
]
} | 1,574 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
allowed_[msg.sender][_spender] = (
allowed_[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed_[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
3726,
4039
]
} | 1,575 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 oldValue = allowed_[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
allowed_[msg.sender][_spender] = 0;
} else {
allowed_[msg.sender][_spender] = oldValue.sub(_subtractedVa... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
4505,
4959
]
} | 1,576 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _mint | function _mint(address _account, uint256 _amount) internal {
require(_account != 0);
totalSupply_ = totalSupply_.add(_amount);
balances_[_account] = balances_[_account].add(_amount);
emit Transfer(address(0), _account, _amount);
}
| /**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param _account The account that will receive the created tokens.
* @param _amount The amount that will be created.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
5295,
5551
]
} | 1,577 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burn | function _burn(address _account, uint256 _amount) internal {
require(_account != 0);
require(_amount <= balances_[_account]);
totalSupply_ = totalSupply_.sub(_amount);
balances_[_account] = balances_[_account].sub(_amount);
emit Transfer(_account, address(0), _amount);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param _account The account whose tokens will be burnt.
* @param _amount The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
5771,
6075
]
} | 1,578 | |
HGGToken | HGGToken.sol | 0x2e963aa99892c403039a93573a43607b547f5b88 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private balances_;
mapping (address => mapping (address => uint256)) private allowed_;
uint256 private totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burnFrom | function _burnFrom(address _account, uint256 _amount) internal {
require(_amount <= allowed_[_account][msg.sender]);
// Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
// this function needs to emit an event with the updated approval.
allowed_[_account][msg.sender] = allow... | /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal _burn function.
* @param _account The account whose tokens will be burnt.
* @param _amount The amount that will be burnt.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://52c192a0b725629aab5d8e5e6f0ffbeb2f3f9c56f98688c6bf5fc58a9bd97af9 | {
"func_code_index": [
6391,
6805
]
} | 1,579 | |
Sequences | contracts/sequences.sol | 0xe5ae9912bf5c8621d411461e7f53144c407d3a79 | Solidity | Base64 | library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (le... | /// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <brecht@loopring.org> | NatSpecSingleLine | encode | function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (len == 0) return "";
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((len + 2) / 3);
// Add some extra buffer at the end
bytes memory result = new bytes(encodedLen + 32);
... | /// @notice Encodes some bytes to the base64 representation | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
190,
1802
]
} | 1,580 | ||
PresaleAllocation | contracts/TempleERC20Token.sol | 0x6cf2a119f98a4b4a7fa4fd08a1e72d7af3ba72fe | Solidity | TempleERC20Token | contract TempleERC20Token is ERC20, ERC20Burnable, Pausable, Ownable, AccessControl {
bytes32 public constant CAN_MINT = keccak256("CAN_MINT");
constructor() ERC20("Temple", "TEMPLE") {
_setupRole(DEFAULT_ADMIN_ROLE, owner());
}
/**
* For use in emergencies to pause all token transfers
... | pause | function pause() external onlyOwner {
_pause();
}
| /**
* For use in emergencies to pause all token transfers
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
326,
391
]
} | 1,581 | ||||
PresaleAllocation | contracts/TempleERC20Token.sol | 0x6cf2a119f98a4b4a7fa4fd08a1e72d7af3ba72fe | Solidity | TempleERC20Token | contract TempleERC20Token is ERC20, ERC20Burnable, Pausable, Ownable, AccessControl {
bytes32 public constant CAN_MINT = keccak256("CAN_MINT");
constructor() ERC20("Temple", "TEMPLE") {
_setupRole(DEFAULT_ADMIN_ROLE, owner());
}
/**
* For use in emergencies to pause all token transfers
... | unpause | function unpause() external onlyOwner {
_unpause();
}
| /**
* Revert back to normal operations once P0 which caused pause has been
* triaged and fixed.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
511,
580
]
} | 1,582 | ||||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
61,
125
]
} | 1,583 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
234,
311
]
} | 1,584 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
549,
626
]
} | 1,585 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
950,
1046
]
} | 1,586 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
1331,
1412
]
} | 1,587 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
1621,
1718
]
} | 1,588 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Coinware | contract Coinware is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functi... | Coinware | function Coinware() {
balances[msg.sender] = 40000000000000000000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS)
totalSupply = 40000000000000000000000000; ... | // Where should the raised ETH go?
// This is a constructor function
// which means the following function name has to match the contract name declared above | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
1196,
2211
]
} | 1,589 | |||
Coinware | Coinware.sol | 0x32ad7ee1d8e3e487674ea0e0980a530785c1a408 | Solidity | Coinware | contract Coinware is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functi... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://e2acfb89a7859da5364ca68c2b5f544ef95846d708c3b26474d909dda885a2ce | {
"func_code_index": [
2807,
3612
]
} | 1,590 | |||
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
251,
437
]
} | 1,591 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
707,
848
]
} | 1,592 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
1138,
1335
]
} | 1,593 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
1581,
2057
]
} | 1,594 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
2520,
2657
]
} | 1,595 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
3140,
3490
]
} | 1,596 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
3942,
4077
]
} | 1,597 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
4549,
4720
]
} | 1,598 |
Unbonded | Unbonded.sol | 0x833bed908817dad9c93a52ca21040afa33da9a56 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | None | ipfs://c271b942d941496cfa53d8ea0c4fc9079e4e7144ff292e1bc898ad6e3434b201 | {
"func_code_index": [
94,
154
]
} | 1,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.