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
GermanBakery
/contracts/Brotchain.sol
0x5721be2b7b1403daaea264daa26c29c51398bc2f
Solidity
Brotchain
contract Brotchain is BaseOpenSea, ERC721Enumerable, ERC721Pausable, Ownable, PullPayment { /** * @dev A BMP pixel encoder, supporting arbitrary colour palettes. */ BMP public immutable _bmp; /** * @dev A Mandelbrot-and-friends fractal generator. */ Mandelbrot public immutable _brot...
pause
function pause() external onlyOwner { _pause(); }
/** * @dev Pause the contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 19686, 19751 ] }
3,807
GermanBakery
/contracts/Brotchain.sol
0x5721be2b7b1403daaea264daa26c29c51398bc2f
Solidity
Brotchain
contract Brotchain is BaseOpenSea, ERC721Enumerable, ERC721Pausable, Ownable, PullPayment { /** * @dev A BMP pixel encoder, supporting arbitrary colour palettes. */ BMP public immutable _bmp; /** * @dev A Mandelbrot-and-friends fractal generator. */ Mandelbrot public immutable _brot...
unpause
function unpause() external onlyOwner { _unpause(); }
/** * @dev Unpause the contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 19803, 19872 ] }
3,808
GermanBakery
/contracts/Brotchain.sol
0x5721be2b7b1403daaea264daa26c29c51398bc2f
Solidity
Brotchain
contract Brotchain is BaseOpenSea, ERC721Enumerable, ERC721Pausable, Ownable, PullPayment { /** * @dev A BMP pixel encoder, supporting arbitrary colour palettes. */ BMP public immutable _bmp; /** * @dev A Mandelbrot-and-friends fractal generator. */ Mandelbrot public immutable _brot...
setContractURI
function setContractURI(string memory contractURI) external onlyOwner { _setContractURI(contractURI); }
/** * @dev OpenSea collection config. * * https://docs.opensea.io/docs/contract-level-metadata */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 20201, 20320 ] }
3,809
GermanBakery
/contracts/Brotchain.sol
0x5721be2b7b1403daaea264daa26c29c51398bc2f
Solidity
Brotchain
contract Brotchain is BaseOpenSea, ERC721Enumerable, ERC721Pausable, Ownable, PullPayment { /** * @dev A BMP pixel encoder, supporting arbitrary colour palettes. */ BMP public immutable _bmp; /** * @dev A Mandelbrot-and-friends fractal generator. */ Mandelbrot public immutable _brot...
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721Enumerable, ERC721Pausable) { tokenConfigs[tokenId].paletteApproval = address(0); super._beforeTokenTransfer(from, to, tokenId); }
/** * @dev Revoke palette approval upon token transfer. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
{ "func_code_index": [ 20395, 20654 ] }
3,810
NametagToken
contracts/NametagToken.sol
0x534ccee849a688581d1b0c65e7ff317ed10c5ed3
Solidity
NametagToken
contract NametagToken is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; ...
name
function name() external view returns (string) { return _name; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c0a733cbe4c09a4bc5ce58392de591b6a194abca0a37694cc8a96d772c7807e6
{ "func_code_index": [ 1884, 1959 ] }
3,811
NametagToken
contracts/NametagToken.sol
0x534ccee849a688581d1b0c65e7ff317ed10c5ed3
Solidity
NametagToken
contract NametagToken is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; ...
symbol
function symbol() external view returns (string) { return _symbol; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c0a733cbe4c09a4bc5ce58392de591b6a194abca0a37694cc8a96d772c7807e6
{ "func_code_index": [ 2060, 2139 ] }
3,812
NametagToken
contracts/NametagToken.sol
0x534ccee849a688581d1b0c65e7ff317ed10c5ed3
Solidity
NametagToken
contract NametagToken is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; ...
tokenURI
function tokenURI(uint256 tokenId) public view returns (string) { require(_exists(tokenId)); return _tokenURIs[tokenId]; }
/** * @dev Returns an URI for a given token ID * Throws if the token ID does not exist. May return an empty string. * @param tokenId uint256 ID of the token to query */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c0a733cbe4c09a4bc5ce58392de591b6a194abca0a37694cc8a96d772c7807e6
{ "func_code_index": [ 2336, 2474 ] }
3,813
NametagToken
contracts/NametagToken.sol
0x534ccee849a688581d1b0c65e7ff317ed10c5ed3
Solidity
NametagToken
contract NametagToken is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; ...
_setTokenURI
function _setTokenURI(uint256 tokenId, string uri) internal { require(_exists(tokenId)); _tokenURIs[tokenId] = uri; }
/** * @dev Internal function to set the token URI for a given token * Reverts if the token ID does not exist * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c0a733cbe4c09a4bc5ce58392de591b6a194abca0a37694cc8a96d772c7807e6
{ "func_code_index": [ 2704, 2837 ] }
3,814
NametagToken
contracts/NametagToken.sol
0x534ccee849a688581d1b0c65e7ff317ed10c5ed3
Solidity
NametagToken
contract NametagToken is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; ...
_burn
function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } }
/** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://c0a733cbe4c09a4bc5ce58392de591b6a194abca0a37694cc8a96d772c7807e6
{ "func_code_index": [ 3072, 3298 ] }
3,815
MasterChef
contracts/OreToken.sol
0x895c75efea36658c2fb452202743208d3d802f34
Solidity
OreToken
contract OreToken is ERC20("BeeToken", "BEE"), Ownable { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); } }
// OreToken with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://f102d7fbb97a406fe49d459cf680abdff8e28afe69695a205f3089f8484aa9ee
{ "func_code_index": [ 156, 260 ] }
3,816
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } uint...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 94, 497 ] }
3,817
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 609, 897 ] }
3,818
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); uint256 c = _a - _b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1012, 1157 ] }
3,819
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1222, 1366 ] }
3,820
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1501, 1618 ] }
3,821
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 199, 287 ] }
3,822
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @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); emit Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 445, 777 ] }
3,823
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 983, 1087 ] }
3,824
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transfer...
/** * @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)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 399, 856 ] }
3,825
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transfer...
/** * @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; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1488, 1683 ] }
3,826
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transfer...
/** * @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
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 2007, 2138 ] }
3,827
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transfer...
/** * @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
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 2604, 2883 ] }
3,828
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transfer...
/** * @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
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit App...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 3354, 3773 ] }
3,829
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Role
contract Role is StandardToken { using SafeMath for uint256; address public owner; address public admin; uint256 public contractDeployed = now; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event AdminshipTransferred( ...
transferOwnership
function transferOwnership(address _newOwner) external onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 916, 1035 ] }
3,830
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Role
contract Role is StandardToken { using SafeMath for uint256; address public owner; address public admin; uint256 public contractDeployed = now; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event AdminshipTransferred( ...
transferAdminship
function transferAdminship(address _newAdmin) external onlyAdmin { _transferAdminship(_newAdmin); }
/** * @dev Allows the current admin to transfer control of the contract to a newAdmin. * @param _newAdmin The address to transfer adminship to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1205, 1323 ] }
3,831
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Role
contract Role is StandardToken { using SafeMath for uint256; address public owner; address public admin; uint256 public contractDeployed = now; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event AdminshipTransferred( ...
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); balances[owner] = balances[owner].sub(balances[owner]); balances[_newOwner] = balances[_newOwner].add(balances[owner]); owner = _newOwner; emit OwnershipTransferred(owner, _newOwner); }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1466, 1798 ] }
3,832
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Role
contract Role is StandardToken { using SafeMath for uint256; address public owner; address public admin; uint256 public contractDeployed = now; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event AdminshipTransferred( ...
_transferAdminship
function _transferAdminship(address _newAdmin) internal { require(_newAdmin != address(0)); emit AdminshipTransferred(admin, _newAdmin); admin = _newAdmin; }
/** * @dev Transfers control of the contract to a newAdmin. * @param _newAdmin The address to transfer adminship to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1941, 2135 ] }
3,833
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Pausable
contract Pausable is Role { event Pause(); event Unpause(); event NotPausable(); bool public paused = false; bool public canPause = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused || msg.sende...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { require(canPause == true); paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 592, 736 ] }
3,834
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Pausable
contract Pausable is Role { event Pause(); event Unpause(); event NotPausable(); bool public paused = false; bool public canPause = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused || msg.sende...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { require(paused == true); paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 820, 948 ] }
3,835
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
Pausable
contract Pausable is Role { event Pause(); event Unpause(); event NotPausable(); bool public paused = false; bool public canPause = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused || msg.sende...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
notPausable
function notPausable() onlyOwner public{ paused = false; canPause = false; emit NotPausable(); }
/** * @dev Prevent the token from ever being paused again **/
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1030, 1163 ] }
3,836
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
lockedTokens
function lockedTokens() public view returns (uint256) { return _lockedTokens; }
/** * @dev Locked number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1395, 1491 ] }
3,837
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
isContract
function isContract(address _address) private view returns (bool is_contract) { uint256 length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_address) } return (length > 0); }
/** * @dev function to check whether passed address is a contract address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1579, 1867 ] }
3,838
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
burn
function burn(uint _value) public returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(msg.sender, _value); return true; }
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 1973, 2243 ] }
3,839
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
burnFrom
function burnFrom(address from, uint _value) public returns (bool success) { require(balances[from] >= _value); require(_value <= allowed[from][msg.sender]); balances[from] = balances[from].sub(_value); allowed[from][msg.sender] = allowed[from][msg.sender].sub(_value); totalSupply_ = totalSuppl...
/** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 2474, 2861 ] }
3,840
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { require(tokenAddress != address(0)); require(isContract(tokenAddress)); return ERC20(tokenAddress).transfer(owner, tokens); }
/** * @dev Function to transfer any ERC20 token to owner address which gets accidentally transferred to this contract * @param tokenAddress The address of the ERC20 contract * @param tokens The amount of tokens to transfer. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 3216, 3466 ] }
3,841
SamToken
SamToken.sol
0x99ed1f3fab1b072764098d5ed88ca79836c3bdaa
Solidity
SamToken
contract SamToken is Pausable { using SafeMath for uint; uint256 _lockedTokens; bool isLocked = true ; bool releasedForOwner ; uint256 public ownerPercent = 10; uint256 public ownerSupply; uint256 public adminPercent = 90; uint256 public adminSupply ; //The name of t...
companyTokensRelease
function companyTokensRelease(address _company) external onlyAdmin returns(bool) { require(_company != address(0), "Address is not valid"); require(!releasedForOwner, "Team release has already done"); if (now > contractDeployed.add(365 days) && releasedForOwner == false ) { balances[_c...
// Transfer token to team
LineComment
v0.4.24+commit.e67f0147
bzzr://02611edbd857c0500732e3b8d3014e11f527e446f3c7fff324114ed4427f3629
{ "func_code_index": [ 3497, 4036 ] }
3,842
LostApes
lostapes.sol
0x0e70916c835cea8c78b58bc36dfd056fae97d535
Solidity
LostApes
contract LostApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.07 ether; uint256 public maxSupply = 3500; uint256 public maxMintAmount = 20; uint256 public nftPerAdd...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://e59dce6ace3462900ee47bdca3a1129861f367b477155460bf9205af4e74a412
{ "func_code_index": [ 815, 920 ] }
3,843
LostApes
lostapes.sol
0x0e70916c835cea8c78b58bc36dfd056fae97d535
Solidity
LostApes
contract LostApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.07 ether; uint256 public maxSupply = 3500; uint256 public maxMintAmount = 20; uint256 public nftPerAdd...
mint
function mint(uint256 _mintAmount) public payable { require(!paused, "the contract is paused"); uint256 supply = totalSupply(); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded"); require(supply + _mintAmount <= maxSupply...
// public
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://e59dce6ace3462900ee47bdca3a1129861f367b477155460bf9205af4e74a412
{ "func_code_index": [ 936, 1876 ] }
3,844
LostApes
lostapes.sol
0x0e70916c835cea8c78b58bc36dfd056fae97d535
Solidity
LostApes
contract LostApes is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.07 ether; uint256 public maxSupply = 3500; uint256 public maxMintAmount = 20; uint256 public nftPerAdd...
reveal
function reveal() public onlyOwner { revealed = true; }
//only owner
LineComment
v0.8.7+commit.e28d00a7
GNU GPLv3
ipfs://e59dce6ace3462900ee47bdca3a1129861f367b477155460bf9205af4e74a412
{ "func_code_index": [ 2999, 3067 ] }
3,845
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
_checkValidity
function _checkValidity(IERC20 _lpToken, IERC20 _sToken) internal view { for (uint256 i = 0; i < poolInfo.length; i++) { require(poolInfo[i].lpToken != _lpToken && poolInfo[i].sToken != _sToken, "pool exist"); } }
// XXX DO NOT add the same LP token more than once.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 4835, 5089 ] }
3,846
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
add
function add( uint256 _allocPoint, uint256 _multiplierSToken, IERC20 _lpToken, IERC20 _sToken, bool _withUpdate ) public { require(msg.sender == admin, "add:Call must come from admin."); if (_withUpdate) { massUpdatePools(); } _checkValidity(_lpToken, _sToken); ...
// Add a new lp to the pool. Can only be called by the admin.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 5159, 6050 ] }
3,847
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
set
function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public { require(msg.sender == admin, "set:Call must come from admin."); if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolIn...
// Update the given pool's SAKE allocation point. Can only be called by the admin.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 6141, 6547 ] }
3,848
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setSakeLockSwitch
function setSakeLockSwitch( uint256 _pid, bool _sakeLockSwitch, bool _withUpdate ) public { require(msg.sender == admin, "s:Call must come from admin."); if (_withUpdate) { massUpdatePools(); } poolInfo[_pid].sakeLockSwitch = _sakeLockSwitch; }
// set sake withdraw switch. Can only be called by the admin.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 6968, 7303 ] }
3,849
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
getMultiplier
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256 multipY, uint256 multipT) { uint256 _toFinalY = _to > yieldFarmingIIEndBlock ? yieldFarmingIIEndBlock : _to; uint256 _toFinalT = _to > tradeMiningEndBlock ? tradeMiningEndBlock : _to; // phase II yield farming multiplier ...
// Return reward multiplier over the given _from to _to block.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 7374, 8509 ] }
3,850
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
handoverSakeMintage
function handoverSakeMintage(address newOwner) public onlyOwner { sake.transferOwnership(newOwner); }
// Handover the saketoken mintage right.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 9162, 9282 ] }
3,851
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
pendingSake
function pendingSake(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accSakePerShare = pool.accSakePerShare; uint256 lpTokenSupply = pool.lpToken.balanceOf(address(this)); uint256 sToke...
// View function to see pending SAKEs on frontend.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 9341, 10520 ] }
3,852
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
massUpdatePools
function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } }
// Update reward vairables for all pools. Be careful of gas spending!
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 10598, 10783 ] }
3,853
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
updatePool
function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpTokenSupply = pool.lpToken.balanceOf(address(this)); uint256 sTokenSupply = pool.sToken.balanceOf(address(this)); if (lpTokenSupply ==...
// Update reward variables of the given pool to be up-to-date.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 10854, 12160 ] }
3,854
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
deposit
function deposit( uint256 _pid, uint256 _amountlpToken, uint256 _amountsToken ) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; if (_amountlpToken <= 0 && user.pengdingSake == 0) { require(user.amountLPtoken > 0, "deposit:inval...
// Deposit LP tokens to SakeMasterV2 for SAKE allocation.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 12226, 14666 ] }
3,855
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
withdraw
function withdraw(uint256 _pid, uint256 _amountLPtoken) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amountLPtoken >= _amountLPtoken, "withdraw: LP amount not enough"); updatePool(_pid); uint256 pending = user.amount.mul(pool....
// Withdraw LP tokens from SakeMaster.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 14713, 16617 ] }
3,856
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
emergencyWithdraw
function emergencyWithdraw(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amountLPtoken > 0, "withdraw: LP amount not enough"); uint256 _amountLPtoken = user.amountLPtoken; uint256 _amountStoken = user.amountStoken...
// Withdraw without caring about rewards. EMERGENCY ONLY.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 16683, 17669 ] }
3,857
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
_safeSakeTransfer
function _safeSakeTransfer(address _to, uint256 _amount) internal { uint256 sakeBal = sake.balanceOf(address(this)); if (_amount > sakeBal) { sake.transfer(_to, sakeBal); } else { sake.transfer(_to, _amount); } }
// Safe sake transfer function, just in case if rounding error causes pool to not have enough SAKEs.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 17778, 18062 ] }
3,858
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setAdmin
function setAdmin(address _adminaddr) public onlyOwner { require(_adminaddr != address(0), "invalid address"); admin = _adminaddr; }
// Update admin address by owner.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 18104, 18264 ] }
3,859
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setSakeMaker
function setSakeMaker(address _sakeMaker) public { require(msg.sender == admin, "sm:Call must come from admin."); require(_sakeMaker != address(0), "invalid address"); sakeMaker = _sakeMaker; }
// Update sakeMaker address by admin.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 18310, 18540 ] }
3,860
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setSakeFeeAddress
function setSakeFeeAddress(address _sakeFeeAddress) public { require(msg.sender == admin, "sf:Call must come from admin."); require(_sakeFeeAddress != address(0), "invalid address"); sakeFeeAddress = _sakeFeeAddress; }
// Update sakeFee address by admin.
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 18584, 18839 ] }
3,861
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setTradeMiningSpeedUpEndBlock
function setTradeMiningSpeedUpEndBlock(uint256 _endBlock) public { require(msg.sender == admin, "tmsu:Call must come from admin."); require(_endBlock > startBlock, "invalid endBlock"); tradeMiningSpeedUpEndBlock = _endBlock; }
// update tradeMiningSpeedUpEndBlock by owner
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 18893, 19156 ] }
3,862
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setYieldFarmingIIEndBlock
function setYieldFarmingIIEndBlock(uint256 _endBlock) public { require(msg.sender == admin, "yf:Call must come from admin."); require(_endBlock > startBlock, "invalid endBlock"); yieldFarmingIIEndBlock = _endBlock; }
// update yieldFarmingIIEndBlock by owner
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 19206, 19459 ] }
3,863
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setTradeMiningEndBlock
function setTradeMiningEndBlock(uint256 _endBlock) public { require(msg.sender == admin, "tm:Call must come from admin."); require(_endBlock > startBlock, "invalid endBlock"); tradeMiningEndBlock = _endBlock; }
// update tradeMiningEndBlock by owner
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 19506, 19753 ] }
3,864
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setSakePerBlockYieldFarming
function setSakePerBlockYieldFarming(uint256 _sakePerBlockYieldFarming, bool _withUpdate) public { require(msg.sender == admin, "yield:Call must come from admin."); if (_withUpdate) { massUpdatePools(); } sakePerBlockYieldFarming = _sakePerBlockYieldFarming; }
// set sakePerBlock phase II yield farming
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 20460, 20779 ] }
3,865
SakeVoterCalc
contracts/SakeMasterV2.sol
0x44d84a9da47fd8f4a06ad66b197d1441fca53f92
Solidity
SakeMasterV2
contract SakeMasterV2 is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 amountStoken; // How many S tokens the user has provided. uint256 amoun...
// SakeMaster is the master of Sake. He can make Sake 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 SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading...
LineComment
setSakePerBlockTradeMining
function setSakePerBlockTradeMining(uint256 _sakePerBlockTradeMining, bool _withUpdate) public { require(msg.sender == admin, "trade:Call must come from admin."); if (_withUpdate) { massUpdatePools(); } sakePerBlockTradeMining = _sakePerBlockTradeMining; }
// set sakePerBlock trade mining
LineComment
v0.6.12+commit.27d51765
None
ipfs://5d4700996a40376e16d7d09f63c9d6b8ef633b28dd8203c5297833f9286dce20
{ "func_code_index": [ 20820, 21135 ] }
3,866
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
BasicToken
contract BasicToken is ERC20Basic { 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,...
/** * @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.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 286, 639 ] }
3,867
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
BasicToken
contract BasicToken is ERC20Basic { 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,...
/** * @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.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 859, 983 ] }
3,868
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 ...
/** * @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)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @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.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 411, 897 ] }
3,869
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 ...
/** * @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 * race...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 1541, 1747 ] }
3,870
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 ...
/** * @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
allowance
function allowance(address _owner, address _spender) public constant 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 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 2083, 2236 ] }
3,871
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 ...
/** * @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
increaseApproval
function increaseApproval (address _spender, uint _addedValue) public 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.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 2493, 2782 ] }
3,872
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 ...
/** * @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
decreaseApproval
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender T...
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 3265, 3724 ] }
3,873
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender;...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 267, 328 ] }
3,874
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender;...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 673, 865 ] }
3,875
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modi...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 557, 660 ] }
3,876
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modi...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 750, 855 ] }
3,877
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
UnionChain
contract UnionChain is StandardToken, Pausable { string public constant name = 'Union Chain'; string public constant symbol = 'UNC'; uint8 public constant decimals = 6; uint256 public constant INITIAL_SUPPLY = 100000000 * 10**uint256(decimals); /** * @dev SesnseToken Constructor *...
/** * @title UnionChain * @dev ERC20 UnionChain (UNC) */
NatSpecMultiLine
UnionChain
function UnionChain() { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; Transfer(0x0, msg.sender, INITIAL_SUPPLY); }
/** * @dev SesnseToken Constructor * Runs only on initial contract creation. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 371, 545 ] }
3,878
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
UnionChain
contract UnionChain is StandardToken, Pausable { string public constant name = 'Union Chain'; string public constant symbol = 'UNC'; uint8 public constant decimals = 6; uint256 public constant INITIAL_SUPPLY = 100000000 * 10**uint256(decimals); /** * @dev SesnseToken Constructor *...
/** * @title UnionChain * @dev ERC20 UnionChain (UNC) */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) whenNotPaused returns (bool) { require(_to != address(0)); return super.transfer(_to, _value); }
/** * @dev Transfer token for a specified address when not paused * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 733, 904 ] }
3,879
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
UnionChain
contract UnionChain is StandardToken, Pausable { string public constant name = 'Union Chain'; string public constant symbol = 'UNC'; uint8 public constant decimals = 6; uint256 public constant INITIAL_SUPPLY = 100000000 * 10**uint256(decimals); /** * @dev SesnseToken Constructor *...
/** * @title UnionChain * @dev ERC20 UnionChain (UNC) */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused returns (bool) { require(_to != address(0)); return super.transferFrom(_from, _to, _value); }
/** * @dev Transfer tokens from one address to another when not paused * @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.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 1212, 1413 ] }
3,880
UnionChain
UnionChain.sol
0x83116523962c3f3fdd9812fd097ba7ab75d8f9c4
Solidity
UnionChain
contract UnionChain is StandardToken, Pausable { string public constant name = 'Union Chain'; string public constant symbol = 'UNC'; uint8 public constant decimals = 6; uint256 public constant INITIAL_SUPPLY = 100000000 * 10**uint256(decimals); /** * @dev SesnseToken Constructor *...
/** * @title UnionChain * @dev ERC20 UnionChain (UNC) */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) whenNotPaused returns (bool) { return super.approve(_spender, _value); }
/** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender when not paused. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */
NatSpecMultiLine
v0.4.13+commit.fb4cb1a
bzzr://c690bad62524d4fc86e43b5d20ea7a69ac99c9cc3d0f0028ebd0852bf9ea8855
{ "func_code_index": [ 1674, 1816 ] }
3,881
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 89, 272 ] }
3,882
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 356, 629 ] }
3,883
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 744, 860 ] }
3,884
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 924, 1060 ] }
3,885
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 199, 287 ] }
3,886
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @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]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); e...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 445, 841 ] }
3,887
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view 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.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 1047, 1159 ] }
3,888
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); 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 transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 401, 858 ] }
3,889
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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) { require((_value == 0) || allowed[msg.sender][_spender]== 0); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 1490, 1751 ] }
3,890
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 2075, 2206 ] }
3,891
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 2672, 2941 ] }
3,892
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal 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 transf...
/** * @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
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approva...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 3412, 3827 ] }
3,893
PtcToken
PtcToken.sol
0x8a8cfb9cd03da7c88f21a7836d0edbcdf5055188
Solidity
PtcToken
contract PtcToken is StandardToken { string public constant name = "PatEx"; // solium-disable-line uppercase string public constant symbol = "PTC"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 49*(...
/** * @title SimpleToken * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */
NatSpecMultiLine
PtcToken
function PtcToken() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); }
/** * @dev Constructor that gives msg.sender all of existing tokens. */
NatSpecMultiLine
v0.4.21+commit.dfe3193c
None
bzzr://ce57b47b5b4f8a4ee4a7af103f10bd80247af3bc54288ecfe226b0a9d3e39427
{ "func_code_index": [ 448, 633 ] }
3,894
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 94, 154 ] }
3,895
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 237, 310 ] }
3,896
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 534, 616 ] }
3,897
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 895, 983 ] }
3,898
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 1647, 1726 ] }
3,899
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 2039, 2141 ] }
3,900
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 259, 445 ] }
3,901
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 723, 864 ] }
3,902
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 1162, 1359 ] }
3,903
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 1613, 2089 ] }
3,904
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 2560, 2697 ] }
3,905
Proposal
Proposal.sol
0x706f53175d91cf03381e31df39728c6bac352f2c
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.15+commit.6a57276f
GNU GPLv3
bzzr://e9694d5d6ccdcfcb104da2e9f5a2c114de30049a1a75c3f378ac1116666957cd
{ "func_code_index": [ 3188, 3471 ] }
3,906