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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PrivateBet | PrivateBet.sol | 0xebb3593048373b1d117709ff3dc69b03d72ba081 | Solidity | PrivateBet | contract PrivateBet {
/*
* subscription event
*/
event NewBet(address indexed _address);
/*
* subscription status
*/
uint8 private paused = 0;
/*
* subscription price
*/
uint private price;
/*
* subscription code
*/
... | /*
* @FadyAro 15 Aug 2018
*
* Private Personal Bet
*/ | Comment | pause | function pause() public {
require(msg.sender == owner, 'not allowed');
paused = 1;
}
| /*
* pause the subscriptions
*/ | Comment | v0.4.24+commit.e67f0147 | bzzr://1f5abe5a6689ed015388fb99cb2c2b2be77e58dbd1acc0544ffd527511c69c0e | {
"func_code_index": [
1890,
2022
]
} | 6,500 | |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
280,
373
]
} | 6,501 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | 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 balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
578,
686
]
} | 6,502 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | 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.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
1013,
1146
]
} | 6,503 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
_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.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
1306,
1447
]
} | 6,504 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(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 con... | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
2079,
2228
]
} | 6,505 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
| /**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The ... | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
2687,
2915
]
} | 6,506 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
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
* Emits an Approval even... | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
3414,
3618
]
} | 6,507 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @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
* Emits an Approval even... | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
4122,
4336
]
} | 6,508 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
4546,
4806
]
} | 6,509 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | _mint | function _mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @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 value The amount that will be created.
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
5145,
5412
]
} | 6,510 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
5634,
5901
]
} | 6,511 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0));
require(owner != address(0));
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/ | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
6162,
6414
]
} | 6,512 |
OwnedUpgradeabilityProxy | ERC20.sol | 0x895b5fe62645c47d37fe5cc3bc9246621f5e47bb | 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 r... | /**
* @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
*
* This implementation emits addi... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 value) internal {
_burn(account, value);
_approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
}
| /**
* @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.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The ... | NatSpecMultiLine | v0.5.9+commit.e560f70d | Apache-2.0 | bzzr://8743d7295a9e30092dbf278b16cce18ba70ce00b7984f4a5c5d0f58be82ceaab | {
"func_code_index": [
6799,
6982
]
} | 6,513 |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | 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://github... | /**
* @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;
}
uint256... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
90,
511
]
} | 6,514 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | 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://github... | /**
* @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;
return c;
}
| /**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
623,
819
]
} | 6,515 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | 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://github... | /**
* @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.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
934,
1073
]
} | 6,516 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | 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://github... | /**
* @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); // will fail if overflow because of wraparound
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1138,
1324
]
} | 6,517 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | 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://github... | /**
* @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.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1459,
1576
]
} | 6,518 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | Ownable | contract Ownable {
using SafeMath for uint256;
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than th... | /**
* @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) public onlyOwner {
require(newOwner != address(0)); // can't accidentally burn the entire contract
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.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
575,
755
]
} | 6,519 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | Ownable | contract Ownable {
using SafeMath for uint256;
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than th... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic
* authorization control functions, this simplifies the implementation of
* "user permissions".
*/ | NatSpecMultiLine | withdraw | function withdraw(address payable destination) public onlyOwner {
require(destination != address(0));
destination.transfer(address(this).balance);
}
| /**
* @dev Allows the owner to withdraw the ether for conversion to USD to handle
* tax credits properly.
* Note: this function withdraws the entire balance of the contract!
* @param destination The destination address to withdraw the funds to
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1028,
1192
]
} | 6,520 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | Ownable | contract Ownable {
using SafeMath for uint256;
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than th... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic
* authorization control functions, this simplifies the implementation of
* "user permissions".
*/ | NatSpecMultiLine | getBalance | function getBalance() public view onlyOwner returns (uint256) {
return address(this).balance.div(1 szabo);
}
| /**
* @dev Allows the owner to view the current balance of the contract to 6 decimal places
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1301,
1420
]
} | 6,521 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev Total number of tokens in existence
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1082,
1170
]
} | 6,522 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | 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 balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1371,
1473
]
} | 6,523 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 value) public onlyOwner {
require(value <= balances[from]);
balances[from] = balances[from].sub(value);
balances[to] = balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer tokens from one address to another - since there are off-chain legal
* transactions that must occur, this function can only be called by the owner; any
* entity that wants to transfer tax credit tokens must go through the contract owner in order
* to get legal documents dispersed first
* @... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
1984,
2245
]
} | 6,524 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | mint | function mint(address account, uint256 value) public onlyOwner {
_handleMint(account, value);
}
| /**
* @dev Public 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. Only the owner of the contract can mint tokens at will.
* @param account The account that will receive the created tokens.
* @p... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
2632,
2738
]
} | 6,525 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | _handleMint | function _handleMint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
balances[account] = balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @dev Internal function that handles and executes the minting of tokens. This
* function exists because there are times when tokens may need to be minted,
* but not by the owner of the contract (namely, when participants exchange their
* ether for tokens).
* @param account The account that will receive t... | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
3152,
3408
]
} | 6,526 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | burn | function burn(address account, uint256 value) public onlyOwner {
require(account != address(0));
require(value <= balances[account]);
_totalSupply = _totalSupply.sub(value);
balances[account] = balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
3625,
3926
]
} | 6,527 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | exchange | function exchange(string memory email) public payable {
require(msg.value > minimumPurchase);
require(keccak256(bytes(email)) != keccak256(bytes(""))); // require email parameter
addresses.push(msg.sender);
emails[msg.sender] = email;
uint256 tokens = msg.value.mul(exchangeRate);
tokens = tokens.mu... | /**
* @dev Allows entities to exchange their Ethereum for tokens representing
* their tax credits. This function mints new tax credit tokens that are backed
* by the ethereum sent to exchange for them.
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
4153,
4699
]
} | 6,528 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | changeMinimumExchange | function changeMinimumExchange(uint256 newMinimum) public onlyOwner {
require(newMinimum > 0); // if minimum is 0 then division errors will occur for exchange and discount rates
minimumPurchase = newMinimum * 1 ether;
exchangeRate = 270000 ether / minimumPurchase;
}
| /**
* @dev Allows owner to change minimum purchase in order to keep minimum
* tax credit exchange around a certain USD threshold
* @param newMinimum The new minimum amount of ether required to purchase tax credit tokens
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
4944,
5232
]
} | 6,529 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | getAllAddresses | function getAllAddresses() public view returns (address[] memory) {
return addresses;
}
| /**
* @dev Return a list of all participants in the contract by address
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
5321,
5419
]
} | 6,530 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | getParticipantEmail | function getParticipantEmail(address addr) public view returns (string memory) {
return emails[addr];
}
| /**
* @dev Return the email of a participant by Ethereum address
* @param addr The address from which to retrieve the email
*/ | NatSpecMultiLine | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
5564,
5678
]
} | 6,531 | |
TaxCredit | TaxCredit.sol | 0x6f3c292d90f539ccb8f7ae1f11edba4aba9001cb | Solidity | TaxCredit | contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;... | /**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/ | NatSpecMultiLine | getAllAddresses | function getAllAddresses(string memory email) public view onlyOwner returns (address[] memory) {
address[] memory all = new address[](addresses.length);
for (uint32 i = 0; i < addresses.length; i++) {
if (keccak256(bytes(emails[addresses[i]])) == keccak256(bytes(email))) {
all[i] = addresses[i];
... | /*
* @dev Return all addresses belonging to a certain email (it is possible that an
* entity may purchase tax credit tokens multiple times with different Ethereum addresses).
*
* NOTE: This transaction may incur a significant gas cost as more participants purchase credits.
*/ | Comment | v0.5.1+commit.c8a2cb62 | bzzr://5202e7d8bc6a0add455c38c7278697bcc75b33b0047939dd7123b33db68ce895 | {
"func_code_index": [
5982,
6345
]
} | 6,532 | |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
259,
445
]
} | 6,533 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
723,
864
]
} | 6,534 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
1162,
1359
]
} | 6,535 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
1613,
2089
]
} | 6,536 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
2560,
2697
]
} | 6,537 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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) {
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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
3188,
3471
]
} | 6,538 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
3931,
4066
]
} | 6,539 |
FORMS_SALE_1 | FORMS_SALE_1.sol | 0xf0518ec0972f3cfda49ef98bf540a23f1de95a28 | 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 ... | /**
* @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.12+commit.27d51765 | Unlicense | ipfs://771c9c3666ea781a2a8b7e7cb89a177398cbe4e3b0a6735d0d7f5eb605b4bdee | {
"func_code_index": [
4546,
4717
]
} | 6,540 |
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
64,
128
]
} | 6,541 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
236,
313
]
} | 6,542 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
550,
627
]
} | 6,543 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
950,
1046
]
} | 6,544 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
1330,
1411
]
} | 6,545 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NS21Token | contract NS21Token {
/// @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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
1619,
1716
]
} | 6,546 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NewSouth21Token | contract NewSouth21Token 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... | NewSouth21Token | function NewSouth21Token() {
balances[msg.sender] = 21000000000000000000000000; // 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 = 2100000000000000000000... | // 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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
1203,
2230
]
} | 6,547 | |||
NewSouth21Token | NewSouth21Token.sol | 0xcf2450b25b52406bdab999fe7816079f7fd88cd3 | Solidity | NewSouth21Token | contract NewSouth21Token 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... | 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.24+commit.e67f0147 | bzzr://d852ded3d96d04c83106abf2c2213f29651620882127e86ac21764f51631a53b | {
"func_code_index": [
2826,
3631
]
} | 6,548 | |||
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
94,
154
]
} | 6,549 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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 | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
237,
310
]
} | 6,550 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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 | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
534,
616
]
} | 6,551 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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 | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
895,
983
]
} | 6,552 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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 | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
1647,
1726
]
} | 6,553 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | 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 | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
2039,
2141
]
} | 6,554 |
MerkleDropFactory | MerkleDropFactory.sol | 0x62caf595eb1ac54aad9bbc10315536728c2ba352 | Solidity | MerkleDropFactory | contract MerkleDropFactory {
using MerkleLib for bytes32;
uint public numTrees = 0;
address public management;
address public treeAdder;
struct MerkleTree {
bytes32 merkleRoot;
bytes32 ipfsHash;
address tokenAddress;
uint initialBalance;
uint s... | setManagement | function setManagement(address newMgmt) public managementOnly {
management = newMgmt;
}
| // change the management key | LineComment | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://83cb51c4d2d82c7849552e6e6dca6164f662d78a1c3faa226f9609e7d4465a49 | {
"func_code_index": [
929,
1035
]
} | 6,555 | ||
UserRegistry | contracts/util/governance/Ownable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
636,
753
]
} | 6,556 |
UserRegistry | contracts/util/governance/Ownable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @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) public onlyOwner {
_transferOwnership(_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.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
918,
1026
]
} | 6,557 |
UserRegistry | contracts/util/governance/Ownable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* acc... | /**
* @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) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
1164,
1342
]
} | 6,558 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | SafeMathLibrary | library SafeMathLibrary {
/**
* @dev Multiplies two unsigned integers, 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 test... | /**
* @title SafeMath
* @dev Unsigned 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;
... | /**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
111,
549
]
} | 6,559 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | SafeMathLibrary | library SafeMathLibrary {
/**
* @dev Multiplies two unsigned integers, 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 test... | /**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 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 unsigned integers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
677,
985
]
} | 6,560 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | SafeMathLibrary | library SafeMathLibrary {
/**
* @dev Multiplies two unsigned integers, 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 test... | /**
* @title SafeMath
* @dev Unsigned 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 unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
1116,
1271
]
} | 6,561 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | SafeMathLibrary | library SafeMathLibrary {
/**
* @dev Multiplies two unsigned integers, 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 test... | /**
* @title SafeMath
* @dev Unsigned 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 unsigned integers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
1352,
1507
]
} | 6,562 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | SafeMathLibrary | library SafeMathLibrary {
/**
* @dev Multiplies two unsigned integers, 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 test... | /**
* @title SafeMath
* @dev Unsigned 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 unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
1660,
1789
]
} | 6,563 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | DistributionPool | contract DistributionPool {
using SafeMathLibrary for uint256;
event WeiPerBIDL(uint256 value);
event Activated();
event Unlock(uint256 amountBIDL, uint256 amountWei);
// Reference variable to a BIDL smart contract.
IERC20Token private _bidlToken;
// Pool parti... | /**
* @title DistributionPool
* @dev Contract used to lock investor's ETH and distribute the BIDL tokens.
*/ | NatSpecMultiLine | admin_getBidlAmountToDeposit | function admin_getBidlAmountToDeposit() public view returns (uint256) {
uint256 weiBalance = address(this).balance;
uint256 bidlAmountSupposedToLock = weiBalance / _weiPerBidl;
uint256 bidlBalance = _bidlToken.balanceOf(address(this));
if (bidlAmountSupposedToLock < bidlBalance) {
return 0;... | // Used by Blockbid admin to calculate amount of BIDL to deposit in the contract. | LineComment | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
1925,
2344
]
} | 6,564 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | DistributionPool | contract DistributionPool {
using SafeMathLibrary for uint256;
event WeiPerBIDL(uint256 value);
event Activated();
event Unlock(uint256 amountBIDL, uint256 amountWei);
// Reference variable to a BIDL smart contract.
IERC20Token private _bidlToken;
// Pool parti... | /**
* @title DistributionPool
* @dev Contract used to lock investor's ETH and distribute the BIDL tokens.
*/ | NatSpecMultiLine | admin_unlock | function admin_unlock(uint256 amountBIDL) public onlyBlockbidAdmin onlyWhenActivated {
_bidlToken.transfer(_poolParticipant, amountBIDL);
uint256 weiToUnlock = _weiPerBidl * amountBIDL;
_poolParticipant.transfer(weiToUnlock);
emit Unlock(amountBIDL, weiToUnlock);
}
| // Called by Blockbid admin to release the ETH and part of the BIDL tokens. | LineComment | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
2432,
2763
]
} | 6,565 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | DistributionPool | contract DistributionPool {
using SafeMathLibrary for uint256;
event WeiPerBIDL(uint256 value);
event Activated();
event Unlock(uint256 amountBIDL, uint256 amountWei);
// Reference variable to a BIDL smart contract.
IERC20Token private _bidlToken;
// Pool parti... | /**
* @title DistributionPool
* @dev Contract used to lock investor's ETH and distribute the BIDL tokens.
*/ | NatSpecMultiLine | admin_activate | function admin_activate() public onlyBlockbidAdmin {
require(_poolParticipant != address(0));
require(!_activated);
_activated = true;
it Activated();
}
| // Prevent any further deposits and start distribution phase. | LineComment | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
2837,
3031
]
} | 6,566 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | DistributionPool | contract DistributionPool {
using SafeMathLibrary for uint256;
event WeiPerBIDL(uint256 value);
event Activated();
event Unlock(uint256 amountBIDL, uint256 amountWei);
// Reference variable to a BIDL smart contract.
IERC20Token private _bidlToken;
// Pool parti... | /**
* @title DistributionPool
* @dev Contract used to lock investor's ETH and distribute the BIDL tokens.
*/ | NatSpecMultiLine | admin_destroy | function admin_destroy() public onlyBlockbidAdmin {
// Drain all BIDL back into Blockbid's admin address.
uint256 bidlBalance = _bidlToken.balanceOf(address(this));
_bidlToken.transfer(_blockbidAdmin, bidlBalance);
// Destroy the contract.
selfdestruct(_poolParticipant);
}
| // Can be used by Blockbid admin to destroy the contract and return all funds to investors. | LineComment | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
3135,
3465
]
} | 6,567 |
DistributionPool | DistributionPool.sol | 0x70d6838bc1d3e54a1a53a1be98f684e408ed5398 | Solidity | DistributionPool | contract DistributionPool {
using SafeMathLibrary for uint256;
event WeiPerBIDL(uint256 value);
event Activated();
event Unlock(uint256 amountBIDL, uint256 amountWei);
// Reference variable to a BIDL smart contract.
IERC20Token private _bidlToken;
// Pool parti... | /**
* @title DistributionPool
* @dev Contract used to lock investor's ETH and distribute the BIDL tokens.
*/ | NatSpecMultiLine | function () external payable {
// Do not allow changing participant address after it has been set.
if (_poolParticipant != address(0) && _poolParticipant != msg.sender) {
revert();
}
// Do not allow top-ups if the contract had been activated.
if (_activated) {
revert();
... | // Process ETH coming from the pool participant address. | LineComment | v0.5.11+commit.c082d0b4 | MIT | bzzr://3218fc0358e28657863b63b0e31830d57a4b2bea51b1e4e2e09ec2e703c4f8e2 | {
"func_code_index": [
3534,
4248
]
} | 6,568 | |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
94,
154
]
} | 6,569 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
237,
310
]
} | 6,570 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
534,
616
]
} | 6,571 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
895,
983
]
} | 6,572 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
1647,
1726
]
} | 6,573 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | IBEP20 | interface IBEP20 {
/**
* @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 BEP20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
2039,
2141
]
} | 6,574 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
259,
445
]
} | 6,575 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
723,
864
]
} | 6,576 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
1162,
1359
]
} | 6,577 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
1613,
2089
]
} | 6,578 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
2560,
2697
]
} | 6,579 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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) {
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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
3188,
3471
]
} | 6,580 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
3931,
4066
]
} | 6,581 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | 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 ... | /**
* @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.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
4546,
4717
]
} | 6,582 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
606,
1230
]
} | 6,583 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
2160,
2562
]
} | 6,584 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
3318,
3496
]
} | 6,585 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
3721,
3922
]
} | 6,586 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
4292,
4523
]
} | 6,587 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
4774,
5095
]
} | 6,588 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
497,
581
]
} | 6,589 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
1139,
1292
]
} | 6,590 |
ELON_TOKEN | ELON_TOKEN.sol | 0x94a872ab170fc61f5d06974111e54aa152d447c5 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://481f64fa506a6da6e567604c5b678a3a7292be0676cd5ffbf75e85b78551085b | {
"func_code_index": [
1442,
1691
]
} | 6,591 |
UserRegistry | contracts/util/governance/Operable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Operable | contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
require(operators_[msg.sender], "OP01");
_;
}
/**
* @dev constructor
*/
constructor() public {
... | /**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operat... | NatSpecMultiLine | isOperator | function isOperator(address _address) public view returns (bool) {
return operators_[_address];
}
| /**
* @dev isOperator
* @param _address operator address
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
441,
549
]
} | 6,592 |
UserRegistry | contracts/util/governance/Operable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Operable | contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
require(operators_[msg.sender], "OP01");
_;
}
/**
* @dev constructor
*/
constructor() public {
... | /**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operat... | NatSpecMultiLine | removeOperator | function removeOperator(address _address) public onlyOwner {
require(operators_[_address], "OP02");
operators_[_address] = false;
emit OperatorRemoved(_address);
}
| /**
* @dev removeOperator
* @param _address operator address
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
631,
815
]
} | 6,593 |
UserRegistry | contracts/util/governance/Operable.sol | 0xe135a2903a64657eea414962b05fa8bf6590098f | Solidity | Operable | contract Operable is Ownable {
mapping (address => bool) private operators_;
/**
* @dev Throws if called by any account other than the operator
*/
modifier onlyOperator {
require(operators_[msg.sender], "OP01");
_;
}
/**
* @dev constructor
*/
constructor() public {
... | /**
* @title Operable
* @dev The Operable contract enable the restrictions of operations to a set of operators
*
* @author Cyril Lapinte - <cyril.lapinte@openfiz.com>
*
* Error messages
* OP01: Message sender must be an operator
* OP02: Address must be an operator
* OP03: Address must not be an operat... | NatSpecMultiLine | defineOperator | function defineOperator(string memory _role, address _address)
public onlyOwner
{
require(!operators_[_address], "OP03");
operators_[_address] = true;
emit OperatorDefined(_role, _address);
}
| /**
* @dev defineOperator
* @param _role operator role
* @param _address operator address
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | MIT | bzzr://614f2f43f73bacac58c70004029d6f1d5293f2a90530e821a8779a65cc80585e | {
"func_code_index": [
930,
1150
]
} | 6,594 |
Unifund | Unifund.sol | 0x04b5e13000c6e9a3255dc057091f3e3eeee7b0f0 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.7.2+commit.51b20bc0 | None | ipfs://c340076cf3545083c88b4bef0fb7088d31334fdb5284d2e2812ca07e7c71b493 | {
"func_code_index": [
747,
1374
]
} | 6,595 |
Unifund | Unifund.sol | 0x04b5e13000c6e9a3255dc057091f3e3eeee7b0f0 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.7.2+commit.51b20bc0 | None | ipfs://c340076cf3545083c88b4bef0fb7088d31334fdb5284d2e2812ca07e7c71b493 | {
"func_code_index": [
2393,
3159
]
} | 6,596 |
Unifund | Unifund.sol | 0x04b5e13000c6e9a3255dc057091f3e3eeee7b0f0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.7.2+commit.51b20bc0 | None | ipfs://c340076cf3545083c88b4bef0fb7088d31334fdb5284d2e2812ca07e7c71b493 | {
"func_code_index": [
606,
1230
]
} | 6,597 |
Unifund | Unifund.sol | 0x04b5e13000c6e9a3255dc057091f3e3eeee7b0f0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.7.2+commit.51b20bc0 | None | ipfs://c340076cf3545083c88b4bef0fb7088d31334fdb5284d2e2812ca07e7c71b493 | {
"func_code_index": [
2160,
2562
]
} | 6,598 |
Unifund | Unifund.sol | 0x04b5e13000c6e9a3255dc057091f3e3eeee7b0f0 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.7.2+commit.51b20bc0 | None | ipfs://c340076cf3545083c88b4bef0fb7088d31334fdb5284d2e2812ca07e7c71b493 | {
"func_code_index": [
3318,
3496
]
} | 6,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.