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
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 5667, 6751 ] }
58,661
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 94, 154 ] }
58,662
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 237, 310 ] }
58,663
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 534, 616 ] }
58,664
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 895, 983 ] }
58,665
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 1647, 1726 ] }
58,666
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2039, 2175 ] }
58,667
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
SafeERC20
library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( ...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 791, 1412 ] }
58,668
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
SafeERC20
library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ad...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2628, 3349 ] }
58,669
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
/** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn mo...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 1929, 2033 ] }
58,670
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalShares
function totalShares() public view returns (uint256) { return _totalShares; }
/** * @dev Getter for the total shares held by payees. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2214, 2310 ] }
58,671
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalReleased
function totalReleased() public view returns (uint256) { return _totalReleased; }
/** * @dev Getter for the total amount of Ether already released. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2399, 2499 ] }
58,672
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalReleased
function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; }
/** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2651, 2775 ] }
58,673
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
shares
function shares(address account) public view returns (uint256) { return _shares[account]; }
/** * @dev Getter for the amount of shares held by an account. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 2861, 2971 ] }
58,674
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
released
function released(address account) public view returns (uint256) { return _released[account]; }
/** * @dev Getter for the amount of Ether already released to a payee. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 3065, 3179 ] }
58,675
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
released
function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; }
/** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 3343, 3483 ] }
58,676
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
payee
function payee(uint256 index) public view returns (address) { return _payees[index]; }
/** * @dev Getter for the address of the payee number `index`. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 3569, 3674 ] }
58,677
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
release
function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); if (payment != 0) { ...
/** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 3869, 4507 ] }
58,678
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
release
function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); ...
/** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 4770, 5483 ] }
58,679
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
_pendingPayment
function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; }
/** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 5656, 5909 ] }
58,680
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
PaymentSplitter
contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); event Warning(string mes...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
_addPayee
function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account)...
/** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 6096, 6574 ] }
58,681
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); }
// *************************** // Overrides // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 3445, 3646 ] }
58,682
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
enableAdmin
function enableAdmin(address addr) external onlyOwner { admins[addr] = true; }
// *************************** // Admins management by owner // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 4260, 4357 ] }
58,683
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
releaseAll
function releaseAll() public onlyAdmin { for (uint i = 0; i < _team.length; i++) { address member = _team[i]; try this.release(payable(member)) {} catch Error(string memory revertReason) { emit Log(revertReason); } catch (bytes memory returnData) { emit...
// *************************** // Release & withdraw // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 4624, 5035 ] }
58,684
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
pause
function pause(bool newState) external onlyAdmin { paused = newState; emit Paused(newState); }
// *************************** // Contract management // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 5280, 5402 ] }
58,685
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
startPromo
function startPromo(uint duration) external onlyAdmin { uint startTime = block.timestamp; promo = Promo(startTime, duration); emit PromoChanged(startTime, duration); }
// Duration in seconds
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 6117, 6321 ] }
58,686
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// *************************** // URI management (Reveal) // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 6429, 6542 ] }
58,687
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
setPrice
function setPrice(PriceType priceType, uint price) external onlyAdmin { require(price > 0, "Zero price"); if (priceType == PriceType.PROMO) { promoPrice = price; } else if (priceType == PriceType.FULL) { fullPrice = price; } emit TicketPriceChanged(priceType, price); }
// *************************** // Promo & price management // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 7220, 7570 ] }
58,688
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
getPrice
function getPrice() public view returns (uint) { uint price = fullPrice; if (admins[msg.sender] == true) { rice = 0; else if ((isPromo() || whitelisted[msg.sender] == true) && promos[msg.sender] < maxDiscountedMintPerUser) { price = promoPrice; } return price; }
// Dynamically gets the token price according to promo, whitelist and msg.sender
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 8242, 8595 ] }
58,689
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
mint
function mint(address to, uint amount) external payable { uint supply = totalSupply(); bool discounted = (getPrice() == promoPrice); require(!paused, "Contract is paused"); require(amount > 0, "Amount is zero"); require(amount <= maxMint, "Amount exceeds max mint"); require(supply + amount...
// *************************** // Mint, Gift & Airdrop // ***************************
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 8704, 9599 ] }
58,690
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
draw
function draw() external payable onlyAdmin { require(!paused, "Contract is paused"); releaseAll(); uint[] memory prizes = consumeRoadmapPrizes(totalSupply()); uint nonce = block.difficulty; for (uint i = 0; i < prizes.length; i++) { uint tokenId = randToken(i, nonce); require(...
// *************************** // Game management // *************************** // Main function to draw the roadmap prizes and pay the winners
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 10521, 11230 ] }
58,691
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
drawOne
function drawOne(uint milliEther) external payable onlyAdmin { require(!paused, "Contract is paused"); releaseAll(); uint seed = uint(keccak256(abi.encodePacked(block.coinbase))); uint nonce = uint(keccak256(abi.encodePacked(msg.sender))); uint tokenId = randToken(seed, nonce); require(tok...
// Alternative draw method to choose one random winner with a given prize
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 11316, 11925 ] }
58,692
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
initRoadmap
function initRoadmap() internal onlyAdmin { roadmap[0] = RoadmapStep(1000,2,22000,1); roadmap[1] = RoadmapStep(2000,3,22000,1); roadmap[2] = RoadmapStep(3000,1,44000,1); roadmap[3] = RoadmapStep(4000,1,44000,1); roadmap[4] = RoadmapStep(5000,50,1100,2); roadmap[5] = RoadmapStep(7000,50,110...
// *************************** // Internals // *************************** // Initialize the roadmap
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 12060, 12578 ] }
58,693
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
consumeRoadmapPrizes
function consumeRoadmapPrizes(uint supply) internal onlyAdmin returns (uint[] memory) { uint index = 0; uint[] memory temp = new uint[](16); for (uint i = 0; i < 9; i++) { isPrizeGiven[roadmap[i].prizeValue] = false; } for (uint i = 0; i < roadmap.length; i++) { if (roadma...
// Consume some prizes according to the roadmap // Rule : winnersCount per week and only one prizeValue same amount at a time.
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 12722, 13813 ] }
58,694
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
randToken
function randToken(uint seed, uint nonce) internal view onlyAdmin returns(uint) { uint supply = totalSupply(); if (supply > 0) { uint tokenId = randModulus(supply, seed, nonce); if (tokenId > 0) { return tokenId; } } return 0; }
// Randomly picks a tokenId
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 13849, 14179 ] }
58,695
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
pay
function pay(address payable to, uint amount) internal onlyAdmin { require(to != address(0), "Can't pay a zero address"); require(address(this).balance >= amount, "No sufficient fund in contract to pay the address"); (bool sent, bytes memory data) = to.call{value: amount}(""); if (sent) { a...
// Pays eth amount to an address
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 14224, 14690 ] }
58,696
MegaMilionsGangstarApes
MegaMilionsGangstarApes.sol
0x3af32fd45224c502469af10e8fff285c18a978bc
Solidity
MegaMilionsGangstarApes
contract MegaMilionsGangstarApes is ERC721, ERC721Enumerable, ERC721URIStorage, ERC2981ContractWideRoyalties, Ownable, PaymentSplitter { using Counters for Counters.Counter; using Strings for uint; using Math for uint; using SafeMath for uint; enum PriceType{ PROMO, FULL } //{ 0, 1 } str...
randModulus
function randModulus(uint max, uint seed, uint nonce) internal view returns(uint) { uint blockNumber = block.number-1; if (block.number>(seed % 256)) { blockNumber=block.number-(seed % 256); } uint rand = uint(keccak256(abi.encodePacked( seed^block.timestamp, block.timesta...
// Gets a random number
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://414d9951eb094e9f3eecc45ff7dcf1c7de317858d1ad8616b1355e70b4b69e2c
{ "func_code_index": [ 14726, 15253 ] }
58,697
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
StandardToken
contract StandardToken is ERC20, SafeMath { /* Token supply got increased and a new owner received these tokens */ event Minted(address receiver, uint amount); /* Actual balances of token holders */ mapping(address => uint) balances; /* approve() allowances */ mapping (address => mapping (addres...
isToken
function isToken() public constant returns (bool Yes) { return true; }
/* Interface declaration */
Comment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 375, 456 ] }
58,698
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
STEST2Token
function STEST2Token(address _owner, address _minter) payable { owner = _owner; minter = _minter; balances[owner] = 0; balances[minter] = 0; allowedTransfer[owner] = true; allowedTransfer[minter] = true; }
//Minter tokens
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 971, 1260 ] }
58,699
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
setTransferAllowance
function setTransferAllowance(bool _allowance) external onlyOwner { TransferAllowed = _allowance; }
//Allow or prohibit token transfers
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 1396, 1514 ] }
58,700
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
mintTokens
function mintTokens(address _target, uint _amount) external returns (bool) { require(msg.sender == owner || msg.sender == minter); require(_amount > 0);//Number of tokens must be greater than 0 uint amount=_amount; require(safeAdd(StatsTotal, amount) <= totalSupply);//The amount of tokens cannot be ...
// Send `_amount` of tokens to `_target`
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 1567, 2319 ] }
58,701
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
decreaseTokens
function decreaseTokens(address _target, uint _amount) external returns (bool) { require(msg.sender == owner || msg.sender == minter); require(_amount > 0);//Number of tokens must be greater than 0 uint amount=_amount; balances[_target] = safeSub(balances[_target], amount); StatsMinted = safeSu...
// Decrease user balance
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 2356, 2948 ] }
58,702
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
allowTransfer
function allowTransfer(address _target, bool _allow) external onlyOwner { allowedTransfer[_target] = _allow; }
// Allow `_target` make token tranfers
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 2999, 3128 ] }
58,703
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
changeOwner
function changeOwner(address _to) external onlyOwner() { balances[_to] = balances[owner]; balances[owner] = 0; owner = _to; }
//Change owner
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 3735, 3897 ] }
58,704
STEST2Token
STEST2Token.sol
0x7bcc0f6b153c227527ff74d1ab33610b51629461
Solidity
STEST2Token
contract STEST2Token is StandardToken { string public name = "STEST2 Token"; string public symbol = "STEST2"; uint public totalSupply = 18000000; //Addresses that are allowed to transfer tokens mapping (address => bool) public allowedTransfer; //Technical variables to store stat...
changeMinter
function changeMinter(address _to) external onlyOwner() { balances[_to] = balances[minter]; balances[minter] = 0; minter = _to; }
//Change minter
LineComment
v0.4.26+commit.4563c3fc
None
bzzr://33f0be552ed69acbe733eb14c1d29a38016f7e3e2ac7014d7143c43a457e22c3
{ "func_code_index": [ 3921, 4087 ] }
58,705
Bridge
contracts/interfaces/IBridgeV1.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
IBridgeV1
interface IBridgeV1 { /** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param amount The amount of tokens getting locked and swapped from the ledger * @param swapInAddress The address (on another ledger) to which the tokens are swapped */ fu...
/** * @title IBridgeV1 - Bridge V1 interface * @notice Interface for the Equalizer Bridge V1 * @author Equalizer * @dev Equalizer bridge interface **/
NatSpecMultiLine
SwapOut
function SwapOut(uint256 amount, address swapInAddress) external returns (bool);
/** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param amount The amount of tokens getting locked and swapped from the ledger * @param swapInAddress The address (on another ledger) to which the tokens are swapped */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 314, 406 ] }
58,706
Bridge
contracts/interfaces/IBridgeV1.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
IBridgeV1
interface IBridgeV1 { /** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param amount The amount of tokens getting locked and swapped from the ledger * @param swapInAddress The address (on another ledger) to which the tokens are swapped */ fu...
/** * @title IBridgeV1 - Bridge V1 interface * @notice Interface for the Equalizer Bridge V1 * @author Equalizer * @dev Equalizer bridge interface **/
NatSpecMultiLine
SwapIn
function SwapIn( bytes32 txHash, address to, uint256 amount ) external returns (bool);
/** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param txHash Transaction hash on the ledger where the swap has beed initiated. * @param to The address to which the tokens are swapped * @param amount The amount of tokens released */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 722, 840 ] }
58,707
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; } /** * @dev remove an account's a...
add
function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; }
/** * @dev give an account access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 141, 279 ] }
58,708
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; } /** * @dev remove an account's a...
remove
function remove(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = false; }
/** * @dev remove an account's access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 347, 489 ] }
58,709
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; } /** * @dev remove an account's a...
has
function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; }
/** * @dev check if an account has this role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 570, 746 ] }
58,710
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Pausable
contract Pausable is PauserRole { event Paused(); event Unpaused(); bool private _paused = false; /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { return _paused; } /** * @dev Modifier to make a function callabl...
paused
function paused() public view returns(bool) { return _paused; }
/** * @return true if the contract is paused, false otherwise. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 191, 265 ] }
58,711
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Pausable
contract Pausable is PauserRole { event Paused(); event Unpaused(); bool private _paused = false; /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { return _paused; } /** * @dev Modifier to make a function callabl...
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 676, 775 ] }
58,712
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
Pausable
contract Pausable is PauserRole { event Paused(); event Unpaused(); bool private _paused = false; /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { return _paused; } /** * @dev Modifier to make a function callabl...
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 859, 960 ] }
58,713
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 90, 486 ] }
58,714
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 598, 877 ] }
58,715
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 992, 1131 ] }
58,716
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 1196, 1335 ] }
58,717
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 1470, 1587 ] }
58,718
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 281, 369 ] }
58,719
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 574, 677 ] }
58,720
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 999, 1161 ] }
58,721
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transfer
function transfer(address to, uint256 value) public returns (bool) { require(value <= _balances[msg.sender]); require(to != address(0)); _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 1317, 1644 ] }
58,722
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
approve
function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 2268, 2497 ] }
58,723
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
transferFrom
function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(_balances[to].add(value) > _balances[to]); require(to != address(0)); uint previousBalances = _balances[from...
/** * @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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 2774, 3442 ] }
58,724
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
retrieveFrom
function retrieveFrom( address from, uint256 value ) public returns (bool) { require(value <= _balances[from]); require(_balances[msg.sender].add(value) > _balances[msg.sender]); uint previousBalances = _balances[from].add(_balances[msg.sender]); assert(_balances[from].add(_balances[msg.send...
/** * @dev Retrieve tokens from one address to owner * @param from address The address which you want to send tokens from * @param value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 3651, 4204 ] }
58,725
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
increaseAllowance
function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } ...
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender T...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 4663, 5009 ] }
58,726
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
decreaseAllowance
function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return...
/** * @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.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 5473, 5829 ] }
58,727
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_mint
function _mint(address account, uint256 amount) internal { require(account != 0); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param amount The amount that will be created. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 6163, 6410 ] }
58,728
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burn
function _burn(address account, uint256 amount) internal { require(account != 0); require(amount <= _balances[account]); _totalSupply = _totalSupply.sub(amount); _balances[account] = _balances[account].sub(amount); emit Transfer(account, address(0), amount); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 6628, 6921 ] }
58,729
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view re...
_burnFrom
function _burnFrom(address account, uint256 amount) internal { require(amount <= _allowed[account][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[a...
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 7234, 7639 ] }
58,730
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens. * @param value The amount of token ...
burn
function burn(uint256 value) public { _burn(msg.sender, value); }
/** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 150, 226 ] }
58,731
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens. * @param value The amount of token ...
sudoBurnFrom
function sudoBurnFrom(address from, uint256 value) public { _burn(from, value); }
/** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 342, 434 ] }
58,732
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens. * @param value The amount of token ...
burnFrom
function burnFrom(address from, uint256 value) public { _burnFrom(from, value); }
/** * @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://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 678, 770 ] }
58,733
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Burnable
contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens. * @param value The amount of token ...
_burn
function _burn(address who, uint256 value) internal { super._burn(who, value); }
/** * @dev Overrides ERC20._burn in order for burn and burnFrom to emit * an additional Burn event. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 891, 982 ] }
58,734
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Mintable
contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address to, ...
mint
function mint( address to, uint256 value ) public onlyMinter returns (bool) { _mint(to, value); return true; }
/** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 282, 439 ] }
58,735
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
name
function name() public view returns(string) { return _name; }
/** * @return the name of the token. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 313, 385 ] }
58,736
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
symbol
function symbol() public view returns(string) { return _symbol; }
/** * @return the symbol of the token. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 441, 517 ] }
58,737
Toka
Toka.sol
0x0bfd1945683489253e401485c6bbb2cfaedca313
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ funct...
decimals
function decimals() public view returns(uint8) { return _decimals; }
/** * @return the number of decimals of the token. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://2284efda29551ff086d9df6727f50cf79450ed831389b0b76d763f36d1893642
{ "func_code_index": [ 585, 664 ] }
58,738
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Proxy
contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates e...
function () payable external { _fallback(); }
/** * @dev Fallback function. * Implemented entirely in `_fallback`. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 105, 161 ] }
58,739
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Proxy
contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates e...
_implementation
function _implementation() internal view returns (address);
/** * @return The Address of the implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 227, 289 ] }
58,740
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Proxy
contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates e...
_delegate
function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize) //...
/** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 580, 1333 ] }
58,741
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Proxy
contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates e...
_willFallback
function _willFallback() internal { }
/** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1546, 1589 ] }
58,742
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Proxy
contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates e...
_fallback
function _fallback() internal { _willFallback(); _delegate(_implementation()); }
/** * @dev fallback implementation. * Extracted to enable manual triggering. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1687, 1783 ] }
58,743
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
_implementation
function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } }
/** * @dev Returns the current implementation. * @return Address of the current implementation */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1497, 1661 ] }
58,744
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
_upgradeTo
function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); }
/** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1799, 1947 ] }
58,745
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
_setImplementation
function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } }
/** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 2087, 2382 ] }
58,746
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
admin
function admin() external view ifAdmin returns (address) { return _admin(); }
/** * @return The address of the proxy admin. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1781, 1869 ] }
58,747
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
implementation
function implementation() external view ifAdmin returns (address) { return _implementation(); }
/** * @return The address of the implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 1935, 2041 ] }
58,748
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
changeAdmin
function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); }
/** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 2221, 2452 ] }
58,749
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
upgradeTo
function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); }
/** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 2640, 2748 ] }
58,750
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
upgradeToAndCall
function upgradeToAndCall(address newImplementation, bytes data) payable external ifAdmin { _upgradeTo(newImplementation); require(newImplementation.delegatecall(data)); }
/** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 3273, 3460 ] }
58,751
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
_admin
function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } }
/** * @return The admin slot. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 3507, 3651 ] }
58,752
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
_setAdmin
function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } }
/** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 3770, 3912 ] }
58,753
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** ...
_willFallback
function _willFallback() internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); }
/** * @dev Only fall back when the sender is not the admin. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 3989, 4152 ] }
58,754
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
InvestProxy
contract InvestProxy is AdminUpgradeabilityProxy { /** * @return The address of the implementation. */ function implementation() external view returns (address) { return _implementation(); } /** * Contract constructor. * It sets the `msg.sender` as the proxy administrator. * @param ...
implementation
function implementation() external view returns (address) { return _implementation(); }
/** * @return The address of the implementation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 115, 213 ] }
58,755
InvestProxy
InvestProxy.sol
0xfd4a69e5c19a5d3399c707a1724cd5d54f034a39
Solidity
Address
library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check ...
isContract
function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more deta...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://44ac918b586bb9e5c853188dad599daac443677bad9fc9aecb7ab43c03a5d37e
{ "func_code_index": [ 382, 1022 ] }
58,756
Bridge
contracts/Bridge.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
Bridge
contract Bridge is IBridgeV1, Ownable { using SafeMath for uint256; // token for the bridge address public token; // List of TXs from the other chain that were processed mapping (bytes32 => bool) txHashes; // Current Fee Rate uint public fee = 5 * 1e18; constructor(address _tokenA...
SwapOut
function SwapOut(uint256 amount, address swapInAddress) external override returns (bool) { require(swapInAddress != address(0), "Bridge: swapInAddress"); require(amount > 0, "Bridge: amount"); require( IERC20(token).transferFrom(msg.sender, address(this), amount), "Bridge: transfer" ); ...
/** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param amount The amount of tokens getting locked and swapped from the ledger * @param swapInAddress The address (on another ledger) to which the tokens are swapped */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 661, 1107 ] }
58,757
Bridge
contracts/Bridge.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
Bridge
contract Bridge is IBridgeV1, Ownable { using SafeMath for uint256; // token for the bridge address public token; // List of TXs from the other chain that were processed mapping (bytes32 => bool) txHashes; // Current Fee Rate uint public fee = 5 * 1e18; constructor(address _tokenA...
SwapIn
function SwapIn( bytes32 txHash, address to, uint256 amount ) external override onlyOwner returns (bool) { require (txHash != bytes32(0), "Bridge: invalid tx"); require (to != address(0), "Bridge: invalid addr"); require (txHashes[txHash] == false, "Bridge: dup tx"); txHashes[txHash] = true;...
/** * @dev Initiates a token transfer from the given ledger to another Ethereum-compliant ledger. * @param txHash Transaction hash on the ledger where the swap has beed initiated. * @param to The address to which the tokens are swapped * @param amount The amount of tokens released */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 1424, 2090 ] }
58,758
Bridge
contracts/Bridge.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
Bridge
contract Bridge is IBridgeV1, Ownable { using SafeMath for uint256; // token for the bridge address public token; // List of TXs from the other chain that were processed mapping (bytes32 => bool) txHashes; // Current Fee Rate uint public fee = 5 * 1e18; constructor(address _tokenA...
withdraw
function withdraw(address to, uint256 amount) external onlyOwner { IERC20(token).transfer(to, amount); }
/** * @dev Initiates a withdrawal transfer from the bridge contract to an address. Only call-able by the owner * @param to The address to which the tokens are swapped * @param amount The amount of tokens released */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 2332, 2452 ] }
58,759
Bridge
contracts/Bridge.sol
0x27ef066f3a3758ff8ee0cf5b86c7dbc0348f77e2
Solidity
Bridge
contract Bridge is IBridgeV1, Ownable { using SafeMath for uint256; // token for the bridge address public token; // List of TXs from the other chain that were processed mapping (bytes32 => bool) txHashes; // Current Fee Rate uint public fee = 5 * 1e18; constructor(address _tokenA...
updateFee
function updateFee(uint newFee) external onlyOwner { uint oldFee = fee; fee = newFee; emit LogFeeUpdate(oldFee, newFee); }
/** * @dev Update the fee on the current chain. Only call-able by the owner * @param newFee uint - the new fee that applies to the current side bridge */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 2627, 2781 ] }
58,760