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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
570,
673
]
} | 16,300 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(
address owner,
address spender
)
public
view
returns (uint256)
{
return _allowed[owner][spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
995,
1150
]
} | 16,301 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
_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.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1306,
1441
]
} | 16,302 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race... | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2065,
2298
]
} | 16,303 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address from,
address to,
uint256 value
)
public
returns (bool)
{
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
return true;
}
| /**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2575,
2824
]
} | 16,304 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseAllowance | function increaseAllowance(
address spender,
uint256 addedValue
)
public
returns (bool)
{
require(spender != address(0));
_allowed[msg.sender][spender] = (
_allowed[msg.sender][spender].add(addedValue));
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender T... | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
3283,
3627
]
} | 16,305 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(
address spender,
uint256 subtractedValue
)
public
returns (bool)
{
require(spender != address(0));
_allowed[msg.sender][spender] = (
_allowed[msg.sender][spender].sub(subtractedValue));
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return t... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender T... | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4091,
4445
]
} | 16,306 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _transfer | function _transfer(address 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.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4650,
4899
]
} | 16,307 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _mint | function _mint(address account, uint256 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.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
5232,
5488
]
} | 16,308 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burn | function _burn(address account, uint256 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.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
5705,
5961
]
} | 16,309 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view re... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 value) internal {
// Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
// this function needs to emit an event with the updated approval.
_allowed[account][msg.sender] = _allowed[account][msg.sender].sub(
value);
_burn(account, ... | /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
6273,
6618
]
} | 16,310 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name of the token.
... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | name | function name() public view returns(string memory) {
return _name;
}
| /**
* @return the name of the token.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
327,
406
]
} | 16,311 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name of the token.
... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns(string memory) {
return _symbol;
}
| /**
* @return the symbol of the token.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
462,
545
]
} | 16,312 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name of the token.
... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns(uint8) {
return _decimals;
}
| /**
* @return the number of decimals of the token.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
613,
692
]
} | 16,313 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | GameWave | contract GameWave is ERC20, ERC20Detailed, Ownable {
uint paymentsTime = block.timestamp;
uint totalPaymentAmount;
uint lastTotalPaymentAmount;
uint minted = 20000000;
mapping (address => uint256) lastWithdrawTime;
/**
* @dev The GW constructor sets the original variables
* specified in ... | function () payable external {
if (msg.value == 0){
withdrawDividends(msg.sender);
}
}
| /**
* Fallback function
*
* The function without name is the default function that is called whenever anyone sends funds to a contract.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
657,
766
]
} | 16,314 | ||||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | GameWave | contract GameWave is ERC20, ERC20Detailed, Ownable {
uint paymentsTime = block.timestamp;
uint totalPaymentAmount;
uint lastTotalPaymentAmount;
uint minted = 20000000;
mapping (address => uint256) lastWithdrawTime;
/**
* @dev The GW constructor sets the original variables
* specified in ... | getDividends | function getDividends(address _holder) view public returns(uint) {
if (paymentsTime >= lastWithdrawTime[_holder]){
return totalPaymentAmount.mul(balanceOf(_holder)).div(minted * (10 ** uint256(decimals())));
} else {
return 0;
}
}
| /**
* @notice This function allows the investor to see the amount of dividends available for withdrawal.
* @param _holder this is the address of the investor, where you can see the number of diverders available for withdrawal.
* @return An uint the value available for the removal of dividends.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1090,
1355
]
} | 16,315 | |||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | GameWave | contract GameWave is ERC20, ERC20Detailed, Ownable {
uint paymentsTime = block.timestamp;
uint totalPaymentAmount;
uint lastTotalPaymentAmount;
uint minted = 20000000;
mapping (address => uint256) lastWithdrawTime;
/**
* @dev The GW constructor sets the original variables
* specified in ... | withdrawDividends | function withdrawDividends(address payable _holder) public returns(uint) {
uint dividends = getDividends(_holder);
lastWithdrawTime[_holder] = block.timestamp;
lastTotalPaymentAmount = lastTotalPaymentAmount.add(dividends);
_holder.transfer(dividends);
}
| /**
* @notice This function allows the investor to withdraw dividends available for withdrawal.
* @param _holder this is the address of the investor, by which there is a withdrawal available to dividend.
* @return An uint value of removed dividends.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
1634,
1914
]
} | 16,316 | |||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | GameWave | contract GameWave is ERC20, ERC20Detailed, Ownable {
uint paymentsTime = block.timestamp;
uint totalPaymentAmount;
uint lastTotalPaymentAmount;
uint minted = 20000000;
mapping (address => uint256) lastWithdrawTime;
/**
* @dev The GW constructor sets the original variables
* specified in ... | startPayments | function startPayments() public {
require(block.timestamp >= paymentsTime + 30 days);
owner.transfer(totalPaymentAmount.sub(lastTotalPaymentAmount));
totalPaymentAmount = address(this).balance;
paymentsTime = block.timestamp;
lastTotalPaymentAmount = 0;
}
| /**
* @notice This function initializes payments with a period of 30 days.
*
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2011,
2297
]
} | 16,317 | |||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setRateToken | function setRateToken(uint256 _rate, uint256 _rateModifier) public onlyOwner returns(uint256){
rate = _rate;
rateModifier = _rateModifier;
}
| /**
* @dev Setter token rate.
* @param _rate this value for change percent relation rate to count of tokens.
* @param _rateModifier this value for change math operation under tokens.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2251,
2419
]
} | 16,318 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setCrowdSale | function setCrowdSale(address _crowdSale) public onlyOwner{
crowdSale = _crowdSale;
}
| /**
* @dev Setter crowd sale address.
* @param _crowdSale Address of the crowd sale contract.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2539,
2643
]
} | 16,319 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | _setRoundTime | function _setRoundTime(uint _currentDeadlineInHours, uint _lastDeadlineInHours) internal {
defaultCurrentDeadlineInHours = _currentDeadlineInHours;
defaultLastDeadlineInHours = _lastDeadlineInHours;
currentDeadline = block.timestamp + 60 * 60 * _currentDeadlineInHours;
lastDeadline = block.timestamp... | /**
* @dev Setter round time.
* @param _currentDeadlineInHours this value current deadline in hours.
* @param _lastDeadlineInHours this value last deadline in hours.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
2840,
3222
]
} | 16,320 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setRoundTime | function setRoundTime(uint _currentDeadlineInHours, uint _lastDeadlineInHours) public onlyOwner {
_setRoundTime(_currentDeadlineInHours, _lastDeadlineInHours);
}
| /**
* @dev Setter round time.
* @param _currentDeadlineInHours this value current deadline in hours.
* @param _lastDeadlineInHours this value last deadline in hours.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
3419,
3599
]
} | 16,321 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setGameWaveAddress | function setGameWaveAddress(address payable _GameWaveAddress) public {
require(address(GameWaveContract) == address(0x0));
GameWaveContract = GameWave(_GameWaveAddress);
}
| /**
* @dev Setter the GameWave contract address. Address can be set at once.
* @param _GameWaveAddress Address of the GameWave contract
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
3763,
3962
]
} | 16,322 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setBearsAddress | function setBearsAddress(address payable _bearsAddress) external {
require(address(BearsContract) == address(0x0));
BearsContract = Bears(_bearsAddress);
}
| /**
* @dev Setter the Bears contract address. Address can be set at once.
* @param _bearsAddress Address of the Bears contract
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4115,
4298
]
} | 16,323 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setBullsAddress | function setBullsAddress(address payable _bullsAddress) external {
require(address(BullsContract) == address(0x0));
BullsContract = Bulls(_bullsAddress);
}
| /**
* @dev Setter the Bulls contract address. Address can be set at once.
* @param _bullsAddress Address of the Bulls contract
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4451,
4634
]
} | 16,324 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | getNow | function getNow() view public returns(uint){
return block.timestamp;
}
| /**
* @dev Getting time from blockchain for timer
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4705,
4794
]
} | 16,325 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | getState | function getState() view public returns(bool) {
if (block.timestamp > currentDeadline) {
return false;
}
return true;
}
| /**
* @dev Getting state of game. True - game continue, False - game stopped
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
4892,
5061
]
} | 16,326 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | setInfo | function setInfo(address _lastHero, uint256 _deposit) public {
require(address(BearsContract) == msg.sender || address(BullsContract) == msg.sender);
if (address(BearsContract) == msg.sender) {
require(depositBulls[currentRound][_lastHero] == 0, "You are already in bulls team");
if (deposi... | /**
* @dev Setting info about participant from Bears or Bulls contract
* @param _lastHero Address of participant
* @param _deposit Amount of deposit
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
5241,
6652
]
} | 16,327 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | calculateProbability | function calculateProbability() public {
require(winner == 0 && getState());
totalGWSupplyOfBulls = GameWaveContract.balanceOf(address(BullsContract));
totalGWSupplyOfBears = GameWaveContract.balanceOf(address(BearsContract));
uint256 percent = (totalSupplyOfBulls.add(totalSupplyOfBears)).div(100)... | /**
* @dev Calculation probability for team's win
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
6967,
8750
]
} | 16,328 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | getWinners | function getWinners() public {
require(winner == 0 && !getState());
uint256 seed1 = address(this).balance;
uint256 seed2 = totalSupplyOfBulls;
uint256 seed3 = totalSupplyOfBears;
uint256 seed4 = totalGWSupplyOfBulls;
uint256 seed5 = totalGWSupplyOfBulls;
uint256 seed6 = block.difficul... | /**
* @dev Getting winner team
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
8802,
11895
]
} | 16,329 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | function () external payable {
if (msg.value == 0){
require(depositBears[currentRound - 1][msg.sender] > 0 || depositBulls[currentRound - 1][msg.sender] > 0);
uint payout = 0;
uint payoutGW = 0;
if (lastWinner == 1 && depositBears[currentRound - 1][msg.sender] > 0) {
... | /**
* @dev Payable function for take prize
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
11959,
13462
]
} | 16,330 | ||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | calculateETHPrize | function calculateETHPrize(address participant) public view returns(uint) {
uint payout = 0;
uint256 totalSupply = (totalSupplyOfBears.add(totalSupplyOfBulls));
if (depositBears[currentRound][participant] > 0) {
payout = totalSupply.mul(depositBears[currentRound][participant]).div(totalSuppl... | /**
* @dev Getting ETH prize of participant
* @param participant Address of participant
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
13576,
14148
]
} | 16,331 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | calculateGWPrize | function calculateGWPrize(address participant) public view returns(uint) {
uint payout = 0;
uint totalSupply = (totalGWSupplyOfBears.add(totalGWSupplyOfBulls)).mul(80).div(100);
if (depositBears[currentRound][participant] > 0) {
payout = totalSupply.mul(depositBears[currentRound][participant... | /**
* @dev Getting GW Token prize of participant
* @param participant Address of participant
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
14267,
14856
]
} | 16,332 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | calculateLastETHPrize | function calculateLastETHPrize(address _lastParticipant) public view returns(uint) {
uint payout = 0;
uint256 totalSupply = (lastTotalSupplyOfBears.add(lastTotalSupplyOfBulls));
if (depositBears[currentRound - 1][_lastParticipant] > 0) {
payout = totalSupply.mul(depositBears[currentRound - 1... | /**
* @dev Getting ETH prize of _lastParticipant
* @param _lastParticipant Address of _lastParticipant
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
14985,
15618
]
} | 16,333 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Bank | contract Bank is Ownable {
using SafeMath for uint256;
mapping (uint256 => mapping (address => uint256)) public depositBears;
mapping (uint256 => mapping (address => uint256)) public depositBulls;
uint256 public currentDeadline;
uint256 public currentRound = 1;
uint256 public lastDea... | /*
* @title Bank
* @dev Bank contract which contained all ETH from Bears and Bulls teams.
* When time in blockchain will be grater then current deadline or last deadline need call getWinner function
* then participants able get prizes.
*
* Last participant(last hero) win 10% from all bank
*
* - To get p... | Comment | calculateLastGWPrize | function calculateLastGWPrize(address _lastParticipant) public view returns(uint) {
uint payout = 0;
uint totalSupply = (lastTotalGWSupplyOfBears.add(lastTotalGWSupplyOfBulls)).mul(80).div(100);
if (depositBears[currentRound - 1][_lastParticipant] > 0) {
payout = totalSupply.mul(depositBears... | /**
* @dev Getting GW Token prize of _lastParticipant
* @param _lastParticipant Address of _lastParticipant
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
15752,
16402
]
} | 16,334 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | CryptoTeam | contract CryptoTeam {
using SafeMath for uint256;
Bank public BankContract;
GameWave public GameWaveContract;
/**
* @dev Payable function. 10% will send to Developers fund and 90% will send to JackPot contract.
* Also setting info about player.
*/
function () external pay... | /**
* @dev Base contract for teams
*/ | NatSpecMultiLine | function () external payable {
require(BankContract.getState() && msg.value >= 0.05 ether);
BankContract.setInfo(msg.sender, msg.value.mul(90).div(100));
address(GameWaveContract).transfer(msg.value.mul(10).div(100));
address(BankContract).transfer(msg.value.mul(90).div(100));
}
| /**
* @dev Payable function. 10% will send to Developers fund and 90% will send to JackPot contract.
* Also setting info about player.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
292,
631
]
} | 16,335 | ||
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Sale | contract Sale {
GameWave public GWContract;
uint256 public buyPrice;
address public owner;
uint balance;
bool crowdSaleClosed = false;
constructor(
address payable _GWContract
) payable public {
owner = msg.sender;
GWContract = GameWave(_GWContract);
... | /*
* @dev Crowdsal contract
*/ | Comment | setPrice | function setPrice(uint256 newBuyPrice) public {
buyPrice = newBuyPrice;
}
| /**
* @notice Allow users to buy tokens for `newBuyPrice`
* @param newBuyPrice Price users can buy from the contract.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
550,
642
]
} | 16,336 | |
Bears | Bears.sol | 0xd8979d3540f17b65573a4032c35d82abce9d455a | Solidity | Sale | contract Sale {
GameWave public GWContract;
uint256 public buyPrice;
address public owner;
uint balance;
bool crowdSaleClosed = false;
constructor(
address payable _GWContract
) payable public {
owner = msg.sender;
GWContract = GameWave(_GWContract);
... | /*
* @dev Crowdsal contract
*/ | Comment | function () payable external {
uint amount = msg.value;
balance = (amount / buyPrice) * 10 ** 18;
GWContract.transfer(msg.sender, balance);
address(GWContract).transfer(amount);
}
| /**
* Fallback function
*
* The function without name is the default function that is called whenever anyone sends funds to a contract and
* sends tokens to the buyer.
*/ | NatSpecMultiLine | v0.5.6+commit.b259423e | bzzr://cf52af4a14d6be938eb670b1e4b028a46035aa287739c45a4067226630ff5a22 | {
"func_code_index": [
853,
1078
]
} | 16,337 | ||
Migrator | contracts/COVER.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | Solidity | COVER | contract COVER is Ownable, ERC20 {
using SafeMath for uint256;
bool private isReleased;
address public blacksmith; // mining contract
address public migrator; // migration contract
uint256 public constant START_TIME = 1605830400; // 11/20/2020 12am UTC
constructor () ERC20("Cover Protocol", "COVER") {
... | /**
* @title COVER token contract
* @author crypto-pumpkin@github
*/ | NatSpecMultiLine | release | function release(address _treasury, address _vestor, address _blacksmith, address _migrator) external onlyOwner {
require(block.timestamp >= START_TIME, "$COVER: not started");
require(isReleased == false, "$COVER: already released");
isReleased = true;
blacksmith = _blacksmith;
migrator = _migrator;
_min... | /// @notice called once and only by owner | NatSpecSingleLine | v0.7.4+commit.3f05b770 | {
"func_code_index": [
1112,
1501
]
} | 16,338 | ||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | totalSupply | function totalSupply() constant returns (uint256 totalSupply);
| // Get the total token supply | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
63,
131
]
} | 16,339 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance);
| // Get the account balance of another account with address _owner | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
208,
284
]
} | 16,340 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | transfer | function transfer(address _to, uint256 _value) returns (bool success);
| // Send _value amount of tokens to address _to | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
342,
418
]
} | 16,341 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
| // Send _value amount of tokens from address _from to address _to | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
495,
590
]
} | 16,342 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | approve | function approve(address _spender, uint256 _value) returns (bool success);
| // Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value.
// this function is required for some DEX functionality | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
844,
924
]
} | 16,343 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() constant returns (uint256 totalSupply);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) constant returns (uint256 balance);
// Send _value amount of t... | // ----------------------------------------------------------------------------------------------
// ERC20 token contract
// BlockchainMX / NewCryptoOrder 2018.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/eth... | LineComment | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining);
| // Returns the amount which _spender is still allowed to withdraw from _owner | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
1013,
1109
]
} | 16,344 | |
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | PryvCn | function PryvCn() {
owner = msg.sender;
balances[owner] = _totalSupply;
}
| // Constructor | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
1073,
1178
]
} | 16,345 | |||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| // What is the balance of a particular account? | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
1357,
1477
]
} | 16,346 | |||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | function() payable{
totalEthInWei = totalEthInWei + msg.value;
uint256 amount = msg.value * unitsOneEthCanBuy;
if (balances[owner] < amount) {
return;
}
balances[owner] = balances[owner] - amount;
balances[msg.sender] = balances[msg.sender] + amount;
Transfer(owner, msg.s... | //payment code here | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
1509,
2047
]
} | 16,347 | ||||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | transfer | function transfer(address _to, uint256 _amount) returns (bool success) {
if (balances[msg.sender] >= _amount
&& _amount > 0
&& balances[_to] + _amount > balances[_to]) {
balances[msg.sender] -= _amount;
balances[_to] += _amount;
Transfer(msg.sender, _to, _amount);
... | //payment code here
// Transfer the balance from owner's account to another account | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
2151,
2596
]
} | 16,348 | |||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _amount
) returns (bool success) {
if (balances[_from] >= _amount
&& allowed[_from][msg.sender] >= _amount
&& _amount > 0
&& balances[_to] + _amount > balances[_to]) {
balances[_from] -= _amount;
... | // Send _value amount of tokens from address _from to address _to
// The transferFrom method is used for a withdraw workflow, allowing contracts to send
// tokens on your behalf, for example to "deposit" to a contract address and/or to charge
// fees in sub-currencies; the command should fail unless the _from account h... | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
3085,
3679
]
} | 16,349 | |||
PryvCn | PryvCn.sol | 0xddad0c85488b0a7aeaf22d96f5c4f28eb046b0a7 | Solidity | PryvCn | contract PryvCn is ERC20Interface {
string public constant symbol = "PRYV";
string public constant name = "pryvateCoin";
uint8 public constant decimals = 18;
uint256 _totalSupply = 200000000000000000000000000;
//price code here
uint256 public constant unitsOneEthCanBuy = 833333;
... | approve | function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
| // Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value. | LineComment | v0.4.20-nightly.2017.12.20+commit.efc198d5 | bzzr://5adee82b8c5f5fc383603c078607cb79f125334e62ea47db4c6df7443ae5b976 | {
"func_code_index": [
3871,
4086
]
} | 16,350 | |||
Migrator | contracts/Migrator.sol | 0xfcf3295b3b357e3e0d37ac5ee14823e06ffdfbc6 | Solidity | Migrator | contract Migrator is Ownable, IMigrator {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IERC20 public safe2;
ICOVER public cover;
address public governance;
bytes32 public immutable merkleRoot;
uint256 public safe2Migrated; // total: 52,689.18
uint256 public safeClaimed; // total: 2160.76
u... | /**
* @title COVER token migrator
* @author crypto-pumpkin@github + @Kiwi
*/ | NatSpecMultiLine | transferMintingRights | function transferMintingRights(address _newAddress) external override {
require(msg.sender == governance, "Migrator: caller not governance");
cover.setMigrator(_newAddress);
}
| /// @notice transfer minting right to new migrator if migrator has issues. Once all migration is done, transfer right to 0. | NatSpecSingleLine | v0.7.4+commit.3f05b770 | {
"func_code_index": [
2474,
2661
]
} | 16,351 | ||
EscalateStaking | openzeppelin-solidity\contracts\access\Ownable.sol | 0x85092a1165283e90996af2bf27f3b08036629038 | 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 | None | ipfs://cbbfc02aa56eea3812e9ed1d3e166e48975ab493b63f6964a981c750b4a69842 | {
"func_code_index": [
497,
581
]
} | 16,352 |
EscalateStaking | openzeppelin-solidity\contracts\access\Ownable.sol | 0x85092a1165283e90996af2bf27f3b08036629038 | 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 | None | ipfs://cbbfc02aa56eea3812e9ed1d3e166e48975ab493b63f6964a981c750b4a69842 | {
"func_code_index": [
1139,
1292
]
} | 16,353 |
EscalateStaking | openzeppelin-solidity\contracts\access\Ownable.sol | 0x85092a1165283e90996af2bf27f3b08036629038 | 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 | None | ipfs://cbbfc02aa56eea3812e9ed1d3e166e48975ab493b63f6964a981c750b4a69842 | {
"func_code_index": [
1442,
1691
]
} | 16,354 |
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
60,
124
]
} | 16,355 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
232,
309
]
} | 16,356 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
546,
623
]
} | 16,357 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
946,
1042
]
} | 16,358 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
1326,
1407
]
} | 16,359 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
1615,
1712
]
} | 16,360 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | ChipCoinContract | contract ChipCoinContract is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one t... | ChipCoinContract | function ChipCoinContract(
) {
balances[msg.sender] = 15000000000000000000; // Give the creator all initial tokens
totalSupply = 15000000000000000000; // Update total supply
name = "BxpChipCoin"; // Set the name for display purpo... | //human 0.1 standard. Just an arbitrary versioning scheme. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
925,
1465
]
} | 16,361 | |||
ChipCoinContract | ChipCoinContract.sol | 0xba65d8f84af667a93b92780301f2933a3b5c917f | Solidity | ChipCoinContract | contract ChipCoinContract is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one t... | 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.19+commit.c4cbbb05 | bzzr://5ed2100e5ba51b90aa2f7eaa7c1e8844cdf234f1ec5f5591959048478bd04119 | {
"func_code_index": [
1526,
2331
]
} | 16,362 | |||
BoostRewardsV2 | contracts/BoostRewardsV2.sol | 0x80128f108922482c5d2dfe745af1d89d7cf39bdc | Solidity | BoostRewardsV2 | contract BoostRewardsV2 is LPTokenWrapper, Ownable {
IERC20 public boostToken;
ITreasury public treasury;
SwapRouter public swapRouter;
IERC20 public stablecoin;
uint256 public tokenCapAmount;
uint256 public starttime;
uint256 public duration;
uint256 public periodFinish = ... | stake | function stake(uint256 amount) public updateReward(msg.sender) checkStart {
require(amount > 0, "Cannot stake 0");
super.stake(amount);
// check user cap
require(
balanceOf(msg.sender) <= tokenCapAmount || block.timestamp >= starttime.add(86400),
"token cap exceeded"
);
... | // stake visibility is public as overriding LPTokenWrapper's stake() function | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://482c2071aaae0822d70ed05bd14d728a54e131ceeea891018c2f5d006cf2550f | {
"func_code_index": [
4955,
5666
]
} | 16,363 | ||
BoostRewardsV2 | contracts/BoostRewardsV2.sol | 0x80128f108922482c5d2dfe745af1d89d7cf39bdc | Solidity | BoostRewardsV2 | contract BoostRewardsV2 is LPTokenWrapper, Ownable {
IERC20 public boostToken;
ITreasury public treasury;
SwapRouter public swapRouter;
IERC20 public stablecoin;
uint256 public tokenCapAmount;
uint256 public starttime;
uint256 public duration;
uint256 public periodFinish = ... | pow | function pow(uint256 a, uint256 b, uint256 c, uint256 exponent) internal pure returns (uint256) {
if (exponent == 0) {
return a;
}
else if (exponent == 1) {
return a.mul(b).div(c);
}
else if (a == 0 && exponent != 0) {
return 0;
}
else {
... | /// Imported from: https://forum.openzeppelin.com/t/does-safemath-library-need-a-safe-power-function/871/7
/// Modified so that it takes in 3 arguments for base
/// @return a * (b / c)^exponent | NatSpecSingleLine | v0.5.17+commit.d19bba13 | MIT | bzzr://482c2071aaae0822d70ed05bd14d728a54e131ceeea891018c2f5d006cf2550f | {
"func_code_index": [
10608,
11124
]
} | 16,364 | ||
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | deposit | function deposit(uint256 amount) public override whenNotPaused nonReentrant returns (uint256 depositShares) {
require(amount > 0, "Must deposit more than zero");
// Check if the amount of new shares to be added is within limits
depositShares = getNumShares(amount);
uint256 potentialNewTotalShares = totalShares(... | /**
* @notice Deposits `amount` USDC from msg.sender into the SeniorPool, and grants you the
* equivalent value of FIDU tokens
* @param amount The amount of USDC to deposit
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1876,
2606
]
} | 16,365 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | depositWithPermit | function depositWithPermit(
uint256 amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public override returns (uint256 depositShares) {
IERC20Permit(config.usdcAddress()).permit(msg.sender, address(this), amount, deadline, v, r, s);
return deposit(amount);
}
| /**
* @notice Identical to deposit, except it allows for a passed up signature to permit
* the Senior Pool to move funds on behalf of the user, all within one transaction.
* @param amount The amount of USDC to deposit
* @param v secp256k1 signature component
* @param r secp256k1 signature component
* @param s se... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
2976,
3276
]
} | 16,366 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | withdraw | function withdraw(uint256 usdcAmount) external override whenNotPaused nonReentrant returns (uint256 amount) {
require(usdcAmount > 0, "Must withdraw more than zero");
// This MUST happen before calculating withdrawShares, otherwise the share price
// changes between calculation and burning of Fidu, which creates ... | /**
* @notice Withdraws USDC from the SeniorPool to msg.sender, and burns the equivalent value of FIDU tokens
* @param usdcAmount The amount of USDC to withdraw
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3453,
3981
]
} | 16,367 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | withdrawInFidu | function withdrawInFidu(uint256 fiduAmount) external override whenNotPaused nonReentrant returns (uint256 amount) {
require(fiduAmount > 0, "Must withdraw more than zero");
// This MUST happen before calculating withdrawShares, otherwise the share price
// changes between calculation and burning of Fidu, which cr... | /**
* @notice Withdraws USDC (denominated in FIDU terms) from the SeniorPool to msg.sender
* @param fiduAmount The amount of USDC to withdraw in terms of FIDU shares
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4163,
4745
]
} | 16,368 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | updateGoldfinchConfig | function updateGoldfinchConfig() external onlyAdmin {
config = GoldfinchConfig(config.configAddress());
}
| /**
* @notice Migrates to a new goldfinch config address
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4815,
4928
]
} | 16,369 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | sweepToCompound | function sweepToCompound() public override onlyAdmin whenNotPaused {
IERC20 usdc = config.getUSDC();
uint256 usdcBalance = usdc.balanceOf(address(this));
ICUSDCContract cUSDC = config.getCUSDCContract();
// Approve compound to the exact amount
bool success = usdc.approve(address(cUSDC), usdcBalance);
requi... | /**
* @notice Moves any USDC still in the SeniorPool to Compound, and tracks the amount internally.
* This is done to earn interest on latent funds until we have other borrowers who can use it.
*
* Requirements:
* - The caller must be an admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5199,
5800
]
} | 16,370 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | sweepFromCompound | function sweepFromCompound() public override onlyAdmin whenNotPaused {
_sweepFromCompound();
}
| /**
* @notice Moves any USDC from Compound back to the SeniorPool, and recognizes interest earned.
* This is done automatically on drawdown or withdraw, but can be called manually if necessary.
*
* Requirements:
* - The caller must be an admin.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6071,
6173
]
} | 16,371 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | invest | function invest(ITranchedPool pool) public override whenNotPaused nonReentrant onlyAdmin {
require(validPool(pool), "Pool must be valid");
if (compoundBalance > 0) {
_sweepFromCompound();
}
ISeniorPoolStrategy strategy = config.getSeniorPoolStrategy();
uint256 amount = strategy.invest(this, pool);
re... | /**
* @notice Invest in an ITranchedPool's senior tranche using the fund's strategy
* @param pool An ITranchedPool whose senior tranche should be considered for investment
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6361,
6975
]
} | 16,372 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | investJunior | function investJunior(ITranchedPool pool, uint256 amount) public override whenNotPaused nonReentrant onlyAdmin {
require(validPool(pool), "Pool must be valid");
// We don't intend to support allowing the senior fund to invest in the junior tranche if it
// has already invested in the senior tranche, so we prohib... | /**
* @notice Invest in an ITranchedPool's junior tranche.
* @param pool An ITranchedPool whose junior tranche to invest in
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7382,
8515
]
} | 16,373 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | redeem | function redeem(uint256 tokenId) public override whenNotPaused nonReentrant onlyAdmin {
IPoolTokens poolTokens = config.getPoolTokens();
IPoolTokens.TokenInfo memory tokenInfo = poolTokens.getTokenInfo(tokenId);
ITranchedPool pool = ITranchedPool(tokenInfo.pool);
(uint256 interestRedeemed, uint256 principalRed... | /**
* @notice Redeem interest and/or principal from an ITranchedPool investment
* @param tokenId the ID of an IPoolTokens token to be redeemed
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
8674,
9130
]
} | 16,374 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | writedown | function writedown(uint256 tokenId) public override whenNotPaused nonReentrant onlyAdmin {
IPoolTokens poolTokens = config.getPoolTokens();
require(address(this) == poolTokens.ownerOf(tokenId), "Only tokens owned by the senior fund can be written down");
IPoolTokens.TokenInfo memory tokenInfo = poolTokens.getTok... | /**
* @notice Write down an ITranchedPool investment. This will adjust the fund's share price
* down if we're considering the investment a loss, or up if the borrower has subsequently
* made repayments that restore confidence that the full loan will be repaid.
* @param tokenId the ID of an IPoolTokens token to be... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
9494,
10807
]
} | 16,375 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | calculateWritedown | function calculateWritedown(uint256 tokenId) public view override returns (uint256) {
IPoolTokens.TokenInfo memory tokenInfo = config.getPoolTokens().getTokenInfo(tokenId);
ITranchedPool pool = ITranchedPool(tokenInfo.pool);
uint256 principalRemaining = tokenInfo.principalAmount.sub(tokenInfo.principalRedeemed);... | /**
* @notice Calculates the writedown amount for a particular pool position
* @param tokenId The token reprsenting the position
* @return The amount in dollars the principal should be written down by
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
11027,
11477
]
} | 16,376 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | assets | function assets() public view override returns (uint256) {
return
compoundBalance.add(config.getUSDC().balanceOf(address(this))).add(totalLoansOutstanding).sub(totalWritedowns);
}
| /**
* @notice Returns the net assests controlled by and owed to the pool
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
11563,
11756
]
} | 16,377 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | getNumShares | function getNumShares(uint256 amount) public view override returns (uint256) {
return usdcToFidu(amount).mul(fiduMantissa()).div(sharePrice);
}
| /**
* @notice Converts and USDC amount to FIDU amount
* @param amount USDC amount to convert to FIDU
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
11873,
12024
]
} | 16,378 | |
SeniorPool | contracts/protocol/core/SeniorPool.sol | 0xfe929cb4726d255005f962a09dbcd286ebfc3b05 | Solidity | SeniorPool | contract SeniorPool is BaseUpgradeablePausable, ISeniorPool {
GoldfinchConfig public config;
using ConfigHelper for GoldfinchConfig;
using SafeMath for uint256;
uint256 public compoundBalance;
mapping(ITranchedPool => uint256) public writedowns;
event DepositMade(address indexed capitalProvider, uint256 a... | /**
* @title Goldfinch's SeniorPool contract
* @notice Main entry point for senior LPs (a.k.a. capital providers)
* Automatically invests across borrower pools using an adjustable strategy.
* @author Goldfinch
*/ | NatSpecMultiLine | _calculateWritedown | function _calculateWritedown(ITranchedPool pool, uint256 principal)
internal
view
returns (uint256 writedownPercent, uint256 writedownAmount)
{
return
Accountant.calculateWritedownForPrincipal(
pool.creditLine(),
principal,
currentTime(),
config.getLatenessGracePeriodInDays(),
... | /* Internal Functions */ | Comment | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
12054,
12438
]
} | 16,379 | |
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier on... | authorize | function authorize(address adr) public onlyOwner {
authorizations[adr] = true;
}
| /**
* Authorize address. Owner only
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
629,
728
]
} | 16,380 | ||
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier on... | unauthorize | function unauthorize(address adr) public onlyOwner {
authorizations[adr] = false;
}
| /**
* Remove address' authorization. Owner only
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
799,
901
]
} | 16,381 | ||
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier on... | isOwner | function isOwner(address account) public view returns (bool) {
return account == owner;
}
| /**
* Check if address is owner
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
956,
1064
]
} | 16,382 | ||
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier on... | isAuthorized | function isAuthorized(address adr) public view returns (bool) {
return authorizations[adr];
}
| /**
* Return address' authorization status
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
1130,
1242
]
} | 16,383 | ||
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier on... | transferOwnership | function transferOwnership(address payable adr) public onlyOwner {
owner = adr;
authorizations[adr] = true;
emit OwnershipTransferred(adr);
}
| /**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/ | NatSpecMultiLine | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
1503,
1681
]
} | 16,384 | ||
OHMPAY | OHMiePay.sol | 0xd5e400c957fa7746fb9fa32cdbe0de807d82f2f5 | Solidity | DividendDistributor | contract DividendDistributor is IDividendDistributor {
using SafeMath for uint256;
address _token;
struct Share {
uint256 amount;
uint256 totalExcluded;// excluded dividend
uint256 totalRealised;
}
IERC20 OHM = IERC20(0x383518188C0C6d7730D91b2c03a03C837814a899);... | getUnpaidEarnings | function getUnpaidEarnings(address shareholder) public view returns (uint256) {
if(shares[shareholder].amount == 0){ return 0; }
uint256 shareholderTotalDividends = getCumulativeDividends(shares[shareholder].amount);
uint256 shareholderTotalExcluded = shares[shareholder].totalExcluded;
if(shareh... | /*
returns the unpaid earnings
*/ | Comment | v0.8.10+commit.fc410830 | MIT | ipfs://27425fc92cc5219c59cf3d29deea88a1d554e71cddddee2f46cafcc1aac99ac1 | {
"func_code_index": [
4642,
5126
]
} | 16,385 | ||
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | EOSCToken | function EOSCToken() public {
decimals = 18; // Amount of decimals for display purposes
balances[msg.sender] = 1000000000 * 10**uint(decimals); // Give the creator all initial tokens (100000 for example)
_totalSupply = 1000000000 * 10**uint(decimals); // T... | // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
456,
1060
]
} | 16,386 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
1248,
1369
]
} | 16,387 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
1589,
1718
]
} | 16,388 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
require (now < 1532092839); // July 20st 2018 1:20PM GMT - Freeze time to move to EOS Classic Mainnet
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(m... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
2062,
2455
]
} | 16,389 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
2962,
3170
]
} | 16,390 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
require (now < 1532092839); // July 20st 2018 1:20PM GMT
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - Sp... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
3700,
4129
]
} | 16,391 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
4412,
4568
]
} | 16,392 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
4923,
5240
]
} | 16,393 | |
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
5432,
5491
]
} | 16,394 | ||
EOSCToken | EOSCToken.sol | 0xcdcf7570e27fe31ad5c6d4c8c7d78d98507d649d | Solidity | EOSCToken | contract EOSCToken is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://3b448f612c8d6e3d6cbe114ac020a94976815febe4ebccce5eba0b7a03f24cc6 | {
"func_code_index": [
5724,
5913
]
} | 16,395 | |
Casa | Casa.sol | 0x7472f396b30de368e289b49de16e6ccdbce464ed | Solidity | Casa | contract Casa is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | Casa | function Casa() public {
symbol = "CASA";
name = "Casa";
decimals = 0;
_totalSupply = 1000000000;
balances[0xCa6001488A5Cbc1B1fCDBd1A3B41ddE142F1C4bD] = _totalSupply;
Transfer(address(0), 0xCa6001488A5Cbc1B1fCDBd1A3B41ddE142F1C4bD, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://564091cb03bc0e1d83ff5687cac11b9e195e4081368b970683301ee6dd0254ae | {
"func_code_index": [
451,
763
]
} | 16,396 | |
Casa | Casa.sol | 0x7472f396b30de368e289b49de16e6ccdbce464ed | Solidity | Casa | contract Casa is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://564091cb03bc0e1d83ff5687cac11b9e195e4081368b970683301ee6dd0254ae | {
"func_code_index": [
951,
1072
]
} | 16,397 | |
Casa | Casa.sol | 0x7472f396b30de368e289b49de16e6ccdbce464ed | Solidity | Casa | contract Casa is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://564091cb03bc0e1d83ff5687cac11b9e195e4081368b970683301ee6dd0254ae | {
"func_code_index": [
1292,
1421
]
} | 16,398 | |
Casa | Casa.sol | 0x7472f396b30de368e289b49de16e6ccdbce464ed | Solidity | Casa | contract Casa is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.18+commit.9cf6e910 | bzzr://564091cb03bc0e1d83ff5687cac11b9e195e4081368b970683301ee6dd0254ae | {
"func_code_index": [
1765,
2042
]
} | 16,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.