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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | removeBurner | function removeBurner(address account) public onlyOwner whenNotPaused {
_removeBurner(account);
}
| /**
* @dev only owner can remove burner
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
1613,
1729
]
} | 22,000 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | burn | function burn(uint256 amount) public onlyBurner whenNotPaused {
_burn(_msgSender(), amount);
}
| /**
* @dev burn burner's coin
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
1782,
1895
]
} | 22,001 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | pause | function pause() public onlyOwner whenNotPaused {
_pause();
}
| /**
* @dev pause all coin transfer
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
1953,
2033
]
} | 22,002 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | unpause | function unpause() public onlyOwner whenPaused {
_unpause();
}
| /**
* @dev unpause all coin transfer
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
2093,
2174
]
} | 22,003 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | addLocker | function addLocker(address account) public onlyOwner whenNotPaused {
_addLocker(account);
}
| /**
* @dev only owner can add locker
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
2234,
2344
]
} | 22,004 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | removeLocker | function removeLocker(address account) public onlyOwner whenNotPaused {
_removeLocker(account);
}
| /**
* @dev only owner can remove locker
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
2407,
2523
]
} | 22,005 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | lock | function lock(address account) public onlyLocker whenNotPaused {
_lock(account);
}
| /**
* @dev only locker can lock account
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
2586,
2687
]
} | 22,006 |
NFTRIX | NFTRIX.sol | 0x2ec4207244331ac5a4f84771d41bf31625a7e2f8 | Solidity | NFTRIX | contract NFTRIX is Pausable, Ownable, Burnable, Lockable, ERC20 {
uint256 private constant _initialSupply = 10_000_000_000e18;
constructor() ERC20("NFTrix", "NFTRIX") {
_mint(_msgSender(), _initialSupply);
}
/**
* @dev Recover ERC20 coin in contract address.
* @param tokenAd... | /**
* @dev Contract for NFTRIX Coin
*/ | NatSpecMultiLine | unlock | function unlock(address account) public onlyOwner whenNotPaused {
_unlock(account);
}
| /**
* @dev only locker can unlock account
*/ | NatSpecMultiLine | v0.8.3+commit.8d00100c | MIT | ipfs://7b960c9f74f1dab015e49671af8cce71485487544020cb8c5ed6e08a4f54c9f3 | {
"func_code_index": [
2752,
2856
]
} | 22,007 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | BasicToken | contract BasicToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
277,
630
]
} | 22,008 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | BasicToken | contract BasicToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
846,
970
]
} | 22,009 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 transfe... | /**
* @title Standard ERC20 token
*
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, ... | /**
* @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 amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
402,
1078
]
} | 22,010 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 transfe... | /**
* @title Standard ERC20 token
*
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.co... | /**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
1323,
1914
]
} | 22,011 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 transfe... | /**
* @title Standard ERC20 token
*
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
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 specifing the amount of tokens still avaible for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
2247,
2396
]
} | 22,012 |
CBDA | CBDA.sol | 0xf48a9afed6cd4c6a2e149601336bc5b919a5db4c | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 transfe... | /**
* @title Standard ERC20 token
*
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* 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
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://ca59432c89b166357d81c66fed8da28c9acb76e1a56588fd1327431431e14581 | {
"func_code_index": [
2649,
2920
]
} | 22,013 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
/**
* @dev r... | add | function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
| /**
* @dev give an account access to this role
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
134,
301
]
} | 22,014 | ||
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
/**
* @dev r... | remove | function remove(Role storage role, address account) internal {
require(account != address(0));
require(has(role, account));
role.bearer[account] = false;
}
| /**
* @dev remove an account's access to this role
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
366,
536
]
} | 22,015 | ||
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
/**
* @dev r... | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0));
return role.bearer[account];
}
| /**
* @dev check if an account has this role
* @return bool
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
613,
765
]
} | 22,016 | ||
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
94,
154
]
} | 22,017 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
237,
310
]
} | 22,018 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
534,
616
]
} | 22,019 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
895,
983
]
} | 22,020 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
1647,
1726
]
} | 22,021 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
2039,
2141
]
} | 22,022 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
259,
445
]
} | 22,023 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
723,
864
]
} | 22,024 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
1162,
1359
]
} | 22,025 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
1613,
2089
]
} | 22,026 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
2560,
2697
]
} | 22,027 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
3188,
3471
]
} | 22,028 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
3931,
4066
]
} | 22,029 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
4546,
4717
]
} | 22,030 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
606,
1230
]
} | 22,031 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: u... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
2160,
2559
]
} | 22,032 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
3315,
3493
]
} | 22,033 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
3718,
3919
]
} | 22,034 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
4289,
4520
]
} | 22,035 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
4771,
5092
]
} | 22,036 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
747,
1374
]
} | 22,037 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
2393,
3159
]
} | 22,038 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | createLockBoxForWallet3m | function createLockBoxForWallet3m(address beneficiary, uint256 amount) onlyOwner external {
createLockBoxForWallet(beneficiary, amount, 90 days);
}
| // Deposit for 3, 6 or 12 months | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
1626,
1792
]
} | 22,039 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | updateBeneficiary | function updateBeneficiary(uint256 lockBoxNumber, address newBeneficiary) public {
LockBoxStruct storage l = lockBoxStructs[lockBoxNumber];
require(msg.sender == l.beneficiary);
l.beneficiary = newBeneficiary;
}
| // Beneficiaries can update the receiver wallet | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
4558,
4806
]
} | 22,040 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | triggerWithdrawAll | function triggerWithdrawAll() public {
for (uint256 i = 0; i < lockBoxStructs.length; ++i) {
if (lockBoxStructs[i].releaseTime <= now && lockBoxStructs[i].balance > 0) {
withdraw(i);
}
}
}
| // Helper function to release everything | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
5297,
5556
]
} | 22,041 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | withdrawUnusedYield | function withdrawUnusedYield(uint256 lockBoxNumber) public onlyOwner {
// Check for deposit time end
require(now > endDepositTime, "Deposit still possible.");
LockBoxStruct storage l = lockBoxStructs[lockBoxNumber];
// Check for non-deposition of tokens
require(l.tokensDepos... | // Retrieve amount from unused lockBoxes | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
5609,
6167
]
} | 22,042 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | updateEndDepositTime | function updateEndDepositTime (uint256 newEndTime) public onlyOwner {
endDepositTime = newEndTime;
}
| // Admin update functions | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
6205,
6324
]
} | 22,043 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | recoverERC20 | function recoverERC20(address tokenAddress, uint256 tokenAmount, address receiver) public onlyOwner {
// Not possible for DIA tokens to prevent accidential early release
require(tokenAddress != 0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419);
IERC20(tokenAddress).transfer(receiver, tokenAmount);
}
| // Retrieve other tokens that were sent to this contract | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
6883,
7214
]
} | 22,044 |
PSYieldContract | PSYieldContract.sol | 0x0576577e89485d377de13e76aec99955b8d36eca | Solidity | PSYieldContract | contract PSYieldContract is YieldRoles {
using SafeERC20 for IERC20;
IERC20 token;
// Timeframe in which it it possible to deposit tokens
uint256 public endDepositTime;
// Max tokens to be deposited
uint256 internal maxTokens;
// Originating wallet for yield payments... | /**
* @dev A token holder contract that will allow a beneficiary to extract the
* tokens after a given release time.
*
* Useful for simple vesting schedules like "advisors get all of their tokens
* after 1 year".
*/ | NatSpecMultiLine | function() external {
revert();
}
| // Do not accept ETH payments | LineComment | v0.5.12+commit.7709ece9 | None | bzzr://0b7420c437fae5ef941b0cb5895cb147a969255ed26298e10a5ef2898dae1a61 | {
"func_code_index": [
7256,
7308
]
} | 22,045 | |
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'AMD Chain' contract
//
// Symbol : AMD
// Name : AMD Chain
// Total supply : 20*10^6
// Decimals : 18
//
// Enjoy.
// --------------------------------... | LineComment | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
241,
421
]
} | 22,046 | ||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'AMD Chain' contract
//
// Symbol : AMD
// Name : AMD Chain
// Total supply : 20*10^6
// Decimals : 18
//
// Enjoy.
// --------------------------------... | LineComment | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
681,
864
]
} | 22,047 | ||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'AMD Chain' contract
//
// Symbol : AMD
// Name : AMD Chain
// Total supply : 20*10^6
// Decimals : 18
//
// Enjoy.
// --------------------------------... | LineComment | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1100,
1562
]
} | 22,048 | ||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'AMD Chain' contract
//
// Symbol : AMD
// Name : AMD Chain
// Total supply : 20*10^6
// Decimals : 18
//
// Enjoy.
// --------------------------------... | LineComment | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (co... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2013,
2343
]
} | 22,049 | ||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
... | // ----------------------------------------------------------------------------
// 'AMD Chain' contract
//
// Symbol : AMD
// Name : AMD Chain
// Total supply : 20*10^6
// Decimals : 18
//
// Enjoy.
// --------------------------------... | LineComment | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2783,
2936
]
} | 22,050 | ||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
90,
149
]
} | 22,051 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
228,
300
]
} | 22,052 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
516,
597
]
} | 22,053 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
868,
955
]
} | 22,054 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > 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 ... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1595,
1673
]
} | 22,055 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @de... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1976,
2077
]
} | 22,056 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
914,
999
]
} | 22,057 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1108,
1197
]
} | 22,058 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
* > Note ... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1748,
1833
]
} | 22,059 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
1888,
1981
]
} | 22,060 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2035,
2147
]
} | 22,061 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2346,
2503
]
} | 22,062 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2557,
2693
]
} | 22,063 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
2827,
2976
]
} | 22,064 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
| /**
* @dev See `IERC20.transferFrom`.
*
* Emits an `Approval` event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of `ERC20`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* -... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
3429,
3685
]
} | 22,065 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
4076,
4283
]
} | 22,066 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
4766,
4983
]
} | 22,067 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _ba... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to `transfer`, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a `Transfer` event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
5453,
5879
]
} | 22,068 | ||||
AMDChain | AMDChain.sol | 0x02b6b98c9f855b9f058e1a6a14200663d0c06970 | Solidity | AMDChain | contract AMDChain is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256... | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an `Approval` event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
... | NatSpecMultiLine | v0.5.11+commit.c082d0b4 | {
"func_code_index": [
6299,
6632
]
} | 22,069 | ||||
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account of `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
1506,
1643
]
} | 22,070 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
// will update unLockedCoins based on time
if(msg.sender != owner){
_updateUnLockedCoins(msg.sender, tokens);
unLockedCoins[msg.sender] = unLockedCoins[msg.sender].sub(tokens);
unLockedCoins[to] = unLockedCoi... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to account
// - Owner's account must have sufficient balance to transfer
// - Zero value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
2005,
2833
]
} | 22,071 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success){
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender,spender,tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
3137,
3367
]
} | 22,072 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success){
// will update unLockedCoins based on time
if(msg.sender != owner){
_updateUnLockedCoins(from, tokens);
unLockedCoins[from] = unLockedCoins[from].sub(tokens);
unLockedCoins[to] = unLockedCoin... | // ------------------------------------------------------------------------
// Transfer `tokens` from the account to the account
//
// The calling account must already have sufficient tokens approve(...)
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spend... | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
3931,
4731
]
} | 22,073 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view 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.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
5026,
5190
]
} | 22,074 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | distributeTokens | function distributeTokens(address to, uint tokens, uint256 lockingPeriod) onlyOwner public returns (bool success) {
// transfer tokens to the "to" address
transfer(to, tokens);
// if there is no lockingPeriod, add coins to unLockedCoins per address
if(lockingPeriod == 0)
unLockedCoins[to] =... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - Zero value transfers are allowed
// - takes in locking Period to lock the tokens to be used
// - if want to tr... | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
5721,
6305
]
} | 22,075 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | _addRecord | function _addRecord(address to, uint tokens, uint256 lockingPeriod) private {
record[to].push(PC(lockingPeriod,tokens, false));
}
| // ------------------------------------------------------------------------
// Adds record of addresses with locking period and coins to lock
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
6561,
6725
]
} | 22,076 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | _updateUnLockedCoins | function _updateUnLockedCoins(address _from, uint tokens) private returns (bool success) {
// if unLockedCoins are greater than "tokens" of "to", initiate transfer
if(unLockedCoins[_from] >= tokens){
return true;
}
// if unLockedCoins are less than "tokens" of "to", update unLockedCoins by ... | // ------------------------------------------------------------------------
// Checks if there is any uunLockedCoins available
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
6966,
7761
]
} | 22,077 |
VT | VT.sol | 0xe7984785e3e4ba05e469c8c89f5433580b070f25 | Solidity | VT | contract VT is ERC20Interface, Owned{
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
ma... | // ----------------------------------------------------------------------------
// VT Token
// ---------------------------------------------------------------------------- | LineComment | _updateRecord | function _updateRecord(address _address) private returns (bool success){
PC[] memory tempArray = record[_address];
uint tempCount = 0;
for(uint i=0; i < tempArray.length; i++){
if(tempArray[i].lockingPeriod < now && tempArray[i].added == false){
tempCount = tempCount.add(tempArray[i... | // ------------------------------------------------------------------------
// Unlock the coins if lockingPeriod is expired
// ------------------------------------------------------------------------ | LineComment | v0.5.4+commit.9549d8ff | BSD-2-Clause | bzzr://1e2af372819291f7b9bb10a11e9b6f62724cafcdf507b33986cb48e9a6e121ef | {
"func_code_index": [
7999,
8690
]
} | 22,078 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | add | function add(uint256 _allocPoint, IBEP20 _lpToken, uint16 _depositFeeBP, uint256 totalMaxRewardToken, bool _withUpdate)
public
onlyOwner
{
require(_depositFeeBP <= 10000, "add: invalid deposit fee basis points");
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
3294,
4141
]
} | 22,079 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, uint256 totalMaxRewardToken, bool _withUpdate)
public
onlyOwner
{
require(_depositFeeBP <= 10000, "set: invalid deposit fee basis points");
if (_withUpdate) {
massUpdatePools();
}
require(poolInfo[_pid].tot... | // Update the given pool's TOKEN allocation point and deposit fee. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
4249,
4959
]
} | 22,080 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | getMultiplier | function getMultiplier(uint256 _from, uint256 _to)
public
pure
returns (uint256)
{
return _to.sub(_from).mul(BONUS_MULTIPLIER);
}
| // Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
5030,
5210
]
} | 22,081 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | pendingToken | function pendingToken(uint256 _pid, address _user)
external
view
returns (uint256)
{
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accTokenPerShare = pool.accTokenPerShare;
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
... | // View function to see pending TOKENs on frontend. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
5270,
6293
]
} | 22,082 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | massUpdatePools | function massUpdatePools()
public
{
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward variables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
6371,
6572
]
} | 22,083 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | updatePool | function updatePool(uint256 _pid)
public
{
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (lpSupply == 0 || pool.allocPoint == 0) {
pool.lastRewardBlock = bl... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
6643,
7823
]
} | 22,084 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount)
public
{
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accTokenPerShare).div(1e12).sub(user.rewardDebt);
... | // Deposit LP tokens to MasterChef for TOKEN allocation. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
7888,
9147
]
} | 22,085 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount)
public
{
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accTokenPerShare).div... | // Withdraw LP tokens from MasterChef. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
9194,
10041
]
} | 22,086 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid)
public
{
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.lpToken.safeTransfer(address(msg.sender), amount);
emit ... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
10107,
10519
]
} | 22,087 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | safeTokenTransfer | function safeTokenTransfer(address _to, uint256 _amount)
internal
{
uint256 tokenBal = token.balanceOf(address(this));
if (_amount > tokenBal) {
token.transfer(_to, tokenBal);
} else {
token.transfer(_to, _amount);
}
}
| // Safe token transfer function, just in case if rounding error causes pool to not have enough TOKENs. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
10630,
10938
]
} | 22,088 |
MasterChef | contracts/MasterChef.sol | 0x7dbe40ac6bb41a5fe4fa2c74f31d7defbc793b58 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeBEP20 for IBEP20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
... | // MasterChef is the master of Token. He can make Token and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once TOKEN is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | updateEmissionRate | function updateEmissionRate(uint256 _tokenPerBlock)
public
onlyOwner
{
massUpdatePools();
tokenPerBlock = _tokenPerBlock;
}
| //Pancake has to add hidden dummy pools inorder to alter the emission, here we make it simple and transparent to all. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://819243db1918f8129995fc0b7826dea17e377a7daecdcc79bcb97fc18e7fe2ac | {
"func_code_index": [
11254,
11430
]
} | 22,089 |
ZapSwapCurve | contracts/libraries/Authorizable.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | Authorizable | contract Authorizable {
// This contract allows a flexible authorization scheme
// The owner who can change authorization status
address public owner;
// A mapping from an address to its authorization status
mapping(address => bool) public authorized;
/// @dev We set the deployer to the owner
... | isAuthorized | function isAuthorized(address who) public view returns (bool) {
return authorized[who];
}
| /// @dev Returns true if an address is authorized
/// @param who the address to check
/// @return true if authorized false if not | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
865,
970
]
} | 22,090 | ||||
ZapSwapCurve | contracts/libraries/Authorizable.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | Authorizable | contract Authorizable {
// This contract allows a flexible authorization scheme
// The owner who can change authorization status
address public owner;
// A mapping from an address to its authorization status
mapping(address => bool) public authorized;
/// @dev We set the deployer to the owner
... | authorize | function authorize(address who) external onlyOwner {
_authorize(who);
}
| /// @dev Privileged function authorize an address
/// @param who the address to authorize | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1070,
1157
]
} | 22,091 | ||||
ZapSwapCurve | contracts/libraries/Authorizable.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | Authorizable | contract Authorizable {
// This contract allows a flexible authorization scheme
// The owner who can change authorization status
address public owner;
// A mapping from an address to its authorization status
mapping(address => bool) public authorized;
/// @dev We set the deployer to the owner
... | deauthorize | function deauthorize(address who) external onlyOwner {
authorized[who] = false;
}
| /// @dev Privileged function to de authorize an address
/// @param who The address to remove authorization from | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1279,
1376
]
} | 22,092 | ||||
ZapSwapCurve | contracts/libraries/Authorizable.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | Authorizable | contract Authorizable {
// This contract allows a flexible authorization scheme
// The owner who can change authorization status
address public owner;
// A mapping from an address to its authorization status
mapping(address => bool) public authorized;
/// @dev We set the deployer to the owner
... | setOwner | function setOwner(address who) public onlyOwner {
owner = who;
}
| /// @dev Function to change owner
/// @param who The new owner address | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1457,
1537
]
} | 22,093 | ||||
ZapSwapCurve | contracts/libraries/Authorizable.sol | 0xb2d75b4c0c44e4144fc8a4f41b2893ef684f3032 | Solidity | Authorizable | contract Authorizable {
// This contract allows a flexible authorization scheme
// The owner who can change authorization status
address public owner;
// A mapping from an address to its authorization status
mapping(address => bool) public authorized;
/// @dev We set the deployer to the owner
... | _authorize | function _authorize(address who) internal {
authorized[who] = true;
}
| /// @dev Inheritable function which authorizes someone
/// @param who the address to authorize | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1642,
1727
]
} | 22,094 | ||||
CRPT | CRPT.sol | 0x08389495d7456e1951ddf7c3a1314a4bfb646d8b | Solidity | CRPT | contract CRPT is Ownable {
uint256 public totalSupply;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
string public constant name = "CRPT";
string public constant symbol = "CRPT";
uint32 public constant decimals = 18;
uint ... | burn | function burn(uint256 _value) public returns (bool) {
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
balances[msg.sender] = balances[msg.sender... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.16+commit.d7661dd9 | Unlicense | bzzr://2f6cb2e5f0c5b9a43ade9668de0b4e291c1baf219615114c72c2eca4e1f5e2a6 | {
"func_code_index": [
4116,
4577
]
} | 22,095 | ||
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping (address => uint256) public balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
290,
663
]
} | 22,096 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping (address => uint256) public balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address ... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
879,
1003
]
} | 22,097 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 trans... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _all... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
406,
995
]
} | 22,098 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 trans... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
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
* ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
1647,
1853
]
} | 22,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.