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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Americo | Americo.sol | 0x09eaf7b80ec741fa8a163cd4dde8367fab37e8a0 | Solidity | Americo | contract Americo {
/* Variables públicas del token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
uint256 public totalSupply;
/* Esto crea una matriz con todos los saldos */
mapping (add... | function () {
throw; // Evita el envío accidental de éter
}
| /* Esta función sin nombre se llama cada vez que alguien intenta enviar éter a ella */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://2bb40ed958008e5bbe69da40c3b5da723d2539387782f8a45ee0dd3e5e3eb1b4 | {
"func_code_index": [
1482,
1564
]
} | 3,707 | ||||
SharkOutlawSquad | /contracts/SharkOutlawSquad.sol | 0xa4eacdf4af749060a22aefe06337cb9fb96d45fb | Solidity | SharkOutlawSquad | contract SharkOutlawSquad is Ownable, EIP712, ERC721Enumerable {
using Strings for uint256;
// Whitelist
bytes32 public constant WHITELIST_TYPEHASH =
keccak256("Whitelist(address buyer,uint256 signedQty)");
address public whitelistSigner;
// Specification
uint256 public constant TOTAL_... | contractURI | function contractURI() public view returns (string memory) {
return _contractURI;
}
| // To support Opensea contract-level metadata
// https://docs.opensea.io/docs/contract-level-metadata | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5343,
5442
]
} | 3,708 | ||||
SharkOutlawSquad | /contracts/SharkOutlawSquad.sol | 0xa4eacdf4af749060a22aefe06337cb9fb96d45fb | Solidity | SharkOutlawSquad | contract SharkOutlawSquad is Ownable, EIP712, ERC721Enumerable {
using Strings for uint256;
// Whitelist
bytes32 public constant WHITELIST_TYPEHASH =
keccak256("Whitelist(address buyer,uint256 signedQty)");
address public whitelistSigner;
// Specification
uint256 public constant TOTAL_... | tokenURI | function tokenURI(uint256 _tokenId)
public
view
override(ERC721)
returns (string memory)
{
require(_exists(_tokenId), "Token not exist");
return string(abi.encodePacked(_tokenBaseURI, _tokenId.toString()));
}
| // To support Opensea token metadata
// https://docs.opensea.io/docs/metadata-standards | LineComment | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5642,
5911
]
} | 3,709 | ||||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | delegate | function delegate(address delegatee) external override {
return _delegate(msg.sender, delegatee);
}
| /**
* PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee
*
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
2115,
2230
]
} | 3,710 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | delegateBySig | function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s,
bool prefix
) external override {
address signatory;
bytes32 domainSeparator =
keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this))... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'
*
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signat... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
2742,
4011
]
} | 3,711 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | getCurrentVotes | function getCurrentVotes(address account) external view virtual override returns (uint96) {
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
| /**
* GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'
*
* @notice Get current voting power for an account
* @param account Account to get voting power for
* @return Voting power for an account
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
4268,
4508
]
} | 3,712 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | getPriorVotes | function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {
require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First c... | /**
* GOVERNANCE FUNCTION. Get voting power at a specific block for an account
*
* @param account Account to get voting power for
* @param blockNumber Block to get voting power at
* @return Voting power for an account at specific block
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
4783,
6000
]
} | 3,713 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | _delegate | function _delegate(address delegator, address delegatee) internal {
address currentDelegate = delegates[delegator];
uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');
delegates[delegator] = delegatee;
emit DelegateChanged(delegator, currentDelegate, delega... | /**
* GOVERNANCE FUNCTION. Make a delegation
*
* @dev Internal function to delegate voting power to an account
* @param delegator The address of the account delegating votes from
* @param delegatee The address to delegate votes to
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
7016,
7438
]
} | 3,714 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | _moveDelegates | function _moveDelegates(
address srcRep,
address dstRep,
uint96 amount
) internal {
if (srcRep != dstRep && amount > 0) {
// It must not revert but do nothing in cases of address(0) being part of the move
// Sub voting amount to source in case it is not the zero address (e.g. transfers)
... | /**
* GOVERNANCE FUNCTION. Move the delegates
*
* @dev Internal function to move delegates between accounts
* @param srcRep The address of the account delegating votes from
* @param dstRep The address of the account delegating votes to
* @param amount The voting power to move
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
7884,
9211
]
} | 3,715 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | _writeCheckpoint | function _writeCheckpoint(
address delegatee,
uint32 nCheckpoints,
uint96 oldVotes,
uint96 newVotes
) internal {
uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');
if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == ... | /**
* GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power
*
* @dev internal function to write a checkpoint for voting power
* @param delegatee The address of the account delegating votes to
* @param nCheckpoints The num checkpoint
* @param oldVotes The previous voting power
* @param new... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
9600,
10281
]
} | 3,716 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | safe32 | function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
require(n < 2**32, errorMessage);
return uint32(n);
}
| /**
* INTERNAL FUNCTION. Internal function to convert from uint256 to uint32
*
* @dev internal function to convert from uint256 to uint32
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
10448,
10613
]
} | 3,717 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | safe96 | function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
require(n < 2**96, errorMessage);
return uint96(n);
}
| /**
* INTERNAL FUNCTION. Internal function to convert from uint256 to uint96
*
* @dev internal function to convert from uint256 to uint96
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
10780,
10945
]
} | 3,718 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | add96 | function add96(
uint96 a,
uint96 b,
string memory errorMessage
) internal pure returns (uint96) {
uint96 c = a + b;
require(c >= a, errorMessage);
return c;
}
| /**
* INTERNAL FUNCTION. Internal function to add two uint96 numbers
*
* @dev internal safe math function to add two uint96 numbers
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
11106,
11324
]
} | 3,719 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | sub96 | function sub96(
uint96 a,
uint96 b,
string memory errorMessage
) internal pure returns (uint96) {
require(b <= a, errorMessage);
return a - b;
}
| /**
* INTERNAL FUNCTION. Internal function to subtract two uint96 numbers
*
* @dev internal safe math function to subtract two uint96 numbers
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
11495,
11691
]
} | 3,720 | ||
TimeLockRegistry | contracts/token/VoteToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | VoteToken | abstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {
using LowGasSafeMath for uint256;
using Address for address;
/* ============ Events ============ */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
even... | /**
* @title VoteToken
* @notice Custom token which tracks voting power for governance
* @dev This is an abstraction of a fork of the Compound governance contract
* VoteToken is used by BABL to allow tracking voting power
* Checkpoints are created every time state is changed which record voting power
* Inherits s... | NatSpecMultiLine | getChainId | function getChainId() internal pure returns (uint256) {
uint256 chainId;
assembly {
chainId := chainid()
}
return chainId;
}
| /**
* INTERNAL FUNCTION. Internal function to get chain ID
*
* @dev internal function to get chain ID
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
11822,
11998
]
} | 3,721 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | disableTokensTransfers | function disableTokensTransfers() external onlyOwner {
require(!tokenTransfersWereDisabled, 'BABL must flow');
tokenTransfersEnabled = false;
tokenTransfersWereDisabled = true;
}
| /**
* PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
3776,
3986
]
} | 3,722 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | enableTokensTransfers | function enableTokensTransfers() external onlyOwner {
tokenTransfersEnabled = true;
}
| /**
* PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens
* Can only happen after the protocol is fully decentralized.
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
4147,
4248
]
} | 3,723 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | setTimeLockRegistry | function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {
require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');
require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');
require(address(newTimeLockRegistry... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions
*
* @notice Set the Time Lock Registry contract to control token vesting conditions
* @param newTimeLockRegistry Address of TimeLockRegistry contract
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
4542,
5114
]
} | 3,724 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | setRewardsDistributor | function setRewardsDistributor(IRewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {
require(address(newRewardsDistributor) != address(0), 'cannot be zero address');
require(address(newRewardsDistributor) != address(this), 'cannot be this contract');
require(address(newRewardsDistri... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards
*
* @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)
* @param newRewardsDistributor Address of Rewards Distributor contract
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
5457,
6057
]
} | 3,725 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | registerLockup | function registerLockup(
address _receiver,
uint256 _amount,
bool _profile,
uint256 _vestingBegin,
uint256 _vestingEnd,
uint256 _lastClaim
) external onlyTimeLockRegistry returns (bool) {
require(balanceOf(msg.sender) >= _amount, 'insufficient balance');
require(_receiver != address(0), ... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry
*
* @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens
* locking them according to the distribution epoch periods and the typ... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
6981,
8219
]
} | 3,726 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | cancelVestedTokens | function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {
return _cancelVestedTokensFromTimeLock(lockedAccount);
}
| /**
* PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period
* applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.
*
* @dev Cancel distribution registration
* @param lockedAccount that should have its still lock... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
8641,
8814
]
} | 3,727 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | claimMyTokens | function claimMyTokens() external {
// claim msg.sender tokens from timeLockRegistry
uint256 amount = timeLockRegistry.claim(msg.sender);
// After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant
// rights to the Time Loc... | /**
* GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry
*
* @dev Claim msg.sender tokens (if any available in the registry)
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
9058,
9811
]
} | 3,728 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | unlockedBalance | function unlockedBalance(address account) public returns (uint256) {
// totalBalance - lockedBalance
return balanceOf(account).sub(lockedBalance(account));
}
| /**
* GOVERNANCE FUNCTION. Get unlocked balance for an account
*
* @notice Get unlocked balance for an account
* @param account Account to check
* @return Amount that is unlocked and available eg. to transfer
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
10059,
10240
]
} | 3,729 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | viewLockedBalance | function viewLockedBalance(address account) public view returns (uint256) {
// distribution of locked tokens
// get amount from distributions
uint256 amount = distribution[account];
uint256 lockedAmount = amount;
// Team and investors cannot transfer tokens in the first year
if (vestedToken[ac... | /**
* GOVERNANCE FUNCTION. View the locked balance for an account
*
* @notice View locked balance for an account
* @param account Account to check
* @return Amount locked in the time of checking
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
10475,
11514
]
} | 3,730 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | lockedBalance | function lockedBalance(address account) public returns (uint256) {
// get amount from distributions locked tokens (if any)
uint256 lockedAmount = viewLockedBalance(account);
// in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting
if (
... | /**
* GOVERNANCE FUNCTION. Get locked balance for an account
*
* @notice Get locked balance for an account
* @param account Account to check
* @return Amount locked in the time of checking
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
11742,
12409
]
} | 3,731 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | getTimeLockRegistry | function getTimeLockRegistry() external view returns (address) {
return address(timeLockRegistry);
}
| /**
* PUBLIC FUNCTION. Get the address of Time Lock Registry
*
* @notice Get the address of Time Lock Registry
* @return Address of the Time Lock Registry
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
12598,
12714
]
} | 3,732 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | approve | function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {
require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');
require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');
uint96 amount;
if ... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting
*
* @notice Override of "Approve" function to allow the `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender` except in the case of spender is... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
13392,
14462
]
} | 3,733 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {
require(
unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||
spender == address(timeLockRegistry),
'TimeLockedToken::increaseAllowance:Not enough unl... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting
*
* @notice Atomically increases the allowance granted to `spender` by the caller.
*
* @dev This is an override with respect to the fulfillment of vesting conditions along the way
* However an us... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
14990,
15688
]
} | 3,734 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {
require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');
require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sen... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting
*
* @notice Atomically decrease the allowance granted to `spender` by the caller.
*
* @dev Atomically decreases the allowance granted to `spender` by the caller.
* This is an override with respec... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
16275,
17172
]
} | 3,735 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | _transfer | function _transfer(
address _from,
address _to,
uint256 _value
) internal override onlyUnpaused {
require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');
require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');
re... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens
*
* @dev Transfer function which includes only unlocked tokens
* Locked tokens can always be transfered back to the returns address
* Transferring to owner allows re-issuance of funds thr... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
17778,
18794
]
} | 3,736 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address _from,
address _to,
uint256 _value
) internal virtual override {
super._beforeTokenTransfer(_from, _to, _value);
_require(
_from == address(0) ||
_from == address(timeLockRegistry) ||
_from == address(rewardsDistributor) ||
... | // Disable garden token transfers. Allow minting and burning. | LineComment | v0.7.6+commit.7338295f | {
"func_code_index": [
19475,
19980
]
} | 3,737 | ||
TimeLockRegistry | contracts/token/TimeLockedToken.sol | 0xae171d3e9f8e755bb8547d4165fd79b148be45de | Solidity | TimeLockedToken | abstract contract TimeLockedToken is VoteToken {
using LowGasSafeMath for uint256;
/* ============ Events ============ */
/// @notice An event that emitted when a new lockout ocurr
event NewLockout(
address account,
uint256 tokenslocked,
bool isTeamOrAdvisor,
uint256 st... | /**
* @title TimeLockedToken
* @notice Time Locked ERC20 Token
* @author Babylon Finance
* @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage
*
* By overriding the balanceOf() and transfer() functions in ERC20,
* an account can show its full, post-distribution balance ... | NatSpecMultiLine | _cancelVestedTokensFromTimeLock | function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {
require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');
// get an update on locked amount from distributions at this precise moment
uint256 loosingAmount = lo... | /**
* PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period
* applied only by Time Lock Registry and specifically to Team or Advisors
*
* @dev Cancel distribution registration
* @param lockedAccount that should have its still locked distribution removed due to non... | NatSpecMultiLine | v0.7.6+commit.7338295f | {
"func_code_index": [
20368,
21551
]
} | 3,738 | ||
ZmineRandom | ZmineRandom.sol | 0xf912efb4e59cd2910d90a78b1c1491a870c54b12 | 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.
*/
constructor() public {
owner = msg.sen... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit 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.25+commit.59dbf8f1 | bzzr://472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe2 | {
"func_code_index": [
675,
872
]
} | 3,739 | |
ZmineRandom | ZmineRandom.sol | 0xf912efb4e59cd2910d90a78b1c1491a870c54b12 | Solidity | Authorizable | contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
/**
* @dev The Authorizable constructor sets the first `authorized` of the contract to the sender
* account.
*/
... | /**
* @title Authorizable
* @dev The Authorizable contract has authorized addresses, and provides basic authorization control
* functions, this simplifies the implementation of "multiple user permissions".
*/ | NatSpecMultiLine | authorize | function authorize(address _address) public onlyOwner {
require(!authorized[_address]);
emit AuthorizationSet(_address, true);
authorized[_address] = true;
}
| /**
* @dev Allows
* @param _address The address to change authorization.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe2 | {
"func_code_index": [
675,
869
]
} | 3,740 | |
ZmineRandom | ZmineRandom.sol | 0xf912efb4e59cd2910d90a78b1c1491a870c54b12 | Solidity | Authorizable | contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
/**
* @dev The Authorizable constructor sets the first `authorized` of the contract to the sender
* account.
*/
... | /**
* @title Authorizable
* @dev The Authorizable contract has authorized addresses, and provides basic authorization control
* functions, this simplifies the implementation of "multiple user permissions".
*/ | NatSpecMultiLine | deauthorize | function deauthorize(address _address) public onlyOwner {
require(authorized[_address]);
emit AuthorizationSet(_address, false);
authorized[_address] = false;
}
| /**
* @dev Disallows
* @param _address The address to change authorization.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://472d9bfef76d6056bd18b026db487e6be397fd41a31211630cf3f8da72e80fe2 | {
"func_code_index": [
972,
1169
]
} | 3,741 | |
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev protection against short address attack
*/
modifier onlyPayloadSize(uint numwords) {
assert(msg.data.length == numwords * 32 + 4);
_;
}
/**
... | transfer | function transfer(address _to, uint256 _value) public onlyPayloadSize(2) returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
require(transfersEnabled);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
476,
954
]
} | 3,742 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev protection against short address attack
*/
modifier onlyPayloadSize(uint numwords) {
assert(msg.data.length == numwords * 32 + 4);
_;
}
/**
... | 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.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
1170,
1294
]
} | 3,743 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | 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 ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public onlyPayloadSize(3) returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
require(transfersEnabled);
balances[_from] = balances[_from].sub(_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.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
411,
954
]
} | 3,744 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | 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 ... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
1606,
1812
]
} | 3,745 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | 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 ... | allowance | function allowance(address _owner, address _spender) public onlyPayloadSize(2) 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.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
2148,
2320
]
} | 3,746 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | 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 ... | 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.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
2577,
2865
]
} | 3,747 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | Solidity | BytechTechnology | contract BytechTechnology is StandardToken {
string public constant name = "Bytech Technology";
string public constant symbol = "BYT";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 70 * 10**7 * (10**uint256(decimals));
uint256 public weiRaised;
uint256 publ... | function() payable public {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
1053,
1124
]
} | 3,748 | ||||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | Solidity | BytechTechnology | contract BytechTechnology is StandardToken {
string public constant name = "Bytech Technology";
string public constant symbol = "BYT";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 70 * 10**7 * (10**uint256(decimals));
uint256 public weiRaised;
uint256 publ... | getTotalAmountOfTokens | function getTotalAmountOfTokens(uint256 _weiAmount) internal pure returns (uint256) {
uint256 amountOfTokens = 0;
if(_weiAmount == 0){
amountOfTokens = 200 * (10**uint256(decimals));
}
if( _weiAmount == 0.001 ether){
amountOfTokens = 300 * (10**uint256(decimals));
}
if( _... | /**
* If the user sends 0 ether, he receives 200
* If he sends 0.001 ether, he receives 300
* If he sends 0.005 ether, he receives 1500
* If he sends 0.01 ether, he receives 3000
* If he sends 0.1 ether he receives 30000
* If he sends 1 ether, he receives 300,000 +100%
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
2354,
5853
]
} | 3,749 | |||
BytechTechnology | BytechTechnology.sol | 0xb772c656f5021b6f0ab5d701c8e2b3c06735071a | Solidity | BytechTechnology | contract BytechTechnology is StandardToken {
string public constant name = "Bytech Technology";
string public constant symbol = "BYT";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 70 * 10**7 * (10**uint256(decimals));
uint256 public weiRaised;
uint256 publ... | claimTokens | function claimTokens() public onlyOwner {
owner.transfer(this.balance);
uint256 balance = balanceOf(this);
transfer(owner, balance);
Transfer(this, owner, balance);
}
| /**
* Peterson's Law Protection
* Claim tokens
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b1d4334e6db6c8dd8d65765e38ecf62e2648591cded1ff8b88f815b9cd29b870 | {
"func_code_index": [
6892,
7104
]
} | 3,750 | |||
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting '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;
}
c = a... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
89,
476
]
} | 3,751 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @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 a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
560,
840
]
} | 3,752 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @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 Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
954,
1070
]
} | 3,753 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1134,
1264
]
} | 3,754 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
199,
287
]
} | 3,755 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
445,
777
]
} | 3,756 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
983,
1087
]
} | 3,757 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
815,
932
]
} | 3,758 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1097,
1205
]
} | 3,759 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1343,
1521
]
} | 3,760 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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 Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
513,
609
]
} | 3,761 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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 Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
693,
791
]
} | 3,762 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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.
* https://github.com/ethereum/EIPs/issues/20
* 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(_v... | /**
* @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 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
401,
891
]
} | 3,763 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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.
* https://github.com/ethereum/EIPs/issues/20
* 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
* race... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1517,
1712
]
} | 3,764 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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.
* https://github.com/ethereum/EIPs/issues/20
* 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 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
2036,
2201
]
} | 3,765 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(
address _spender,
uint256 _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 _spender T... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
2661,
2971
]
} | 3,766 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | 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.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 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.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
3436,
3885
]
} | 3,767 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SuccinctWhitelist | contract SuccinctWhitelist is Ownable {
mapping(address => bool) public whitelisted;
event WhitelistAdded(address indexed operator);
event WhitelistRemoved(address indexed operator);
/**
* @dev Throws if operator is not whitelisted.
* @param _operator address
*/
modifier onlyIfWhitelisted... | /**
* @title SuccinctWhitelist
* @dev The SuccinctWhitelist contract has a whitelist of addresses, and provides basic authorization control functions.
* Note: this is a succinct, straightforward and easy to understand implementation of openzeppelin-solidity's Whitelisted,
* but with full functionalities and API... | NatSpecMultiLine | addAddressToWhitelist | function addAddressToWhitelist(address _operator)
onlyOwner
public
returns (bool)
{
whitelisted[_operator] = true;
emit WhitelistAdded(_operator);
return true;
}
| /**
* @dev add an address to the whitelist
* @param _operator address
* @return true if the address was added to the whitelist,
* or was already in the whitelist
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
584,
784
]
} | 3,768 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SuccinctWhitelist | contract SuccinctWhitelist is Ownable {
mapping(address => bool) public whitelisted;
event WhitelistAdded(address indexed operator);
event WhitelistRemoved(address indexed operator);
/**
* @dev Throws if operator is not whitelisted.
* @param _operator address
*/
modifier onlyIfWhitelisted... | /**
* @title SuccinctWhitelist
* @dev The SuccinctWhitelist contract has a whitelist of addresses, and provides basic authorization control functions.
* Note: this is a succinct, straightforward and easy to understand implementation of openzeppelin-solidity's Whitelisted,
* but with full functionalities and API... | NatSpecMultiLine | whitelist | function whitelist(address _operator)
public
view
returns (bool)
{
bool result = whitelisted[_operator];
return result;
}
| /**
* @dev getter to determine if address is in whitelist
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
859,
1014
]
} | 3,769 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SuccinctWhitelist | contract SuccinctWhitelist is Ownable {
mapping(address => bool) public whitelisted;
event WhitelistAdded(address indexed operator);
event WhitelistRemoved(address indexed operator);
/**
* @dev Throws if operator is not whitelisted.
* @param _operator address
*/
modifier onlyIfWhitelisted... | /**
* @title SuccinctWhitelist
* @dev The SuccinctWhitelist contract has a whitelist of addresses, and provides basic authorization control functions.
* Note: this is a succinct, straightforward and easy to understand implementation of openzeppelin-solidity's Whitelisted,
* but with full functionalities and API... | NatSpecMultiLine | addAddressesToWhitelist | function addAddressesToWhitelist(address[] _operators)
onlyOwner
public
returns (bool)
{
for (uint256 i = 0; i < _operators.length; i++) {
require(addAddressToWhitelist(_operators[i]));
}
return true;
}
| /**
* @dev add addresses to the whitelist
* @param _operators addresses
* @return true if all addresses was added to the whitelist,
* or were already in the whitelist
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1210,
1458
]
} | 3,770 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SuccinctWhitelist | contract SuccinctWhitelist is Ownable {
mapping(address => bool) public whitelisted;
event WhitelistAdded(address indexed operator);
event WhitelistRemoved(address indexed operator);
/**
* @dev Throws if operator is not whitelisted.
* @param _operator address
*/
modifier onlyIfWhitelisted... | /**
* @title SuccinctWhitelist
* @dev The SuccinctWhitelist contract has a whitelist of addresses, and provides basic authorization control functions.
* Note: this is a succinct, straightforward and easy to understand implementation of openzeppelin-solidity's Whitelisted,
* but with full functionalities and API... | NatSpecMultiLine | removeAddressFromWhitelist | function removeAddressFromWhitelist(address _operator)
onlyOwner
public
returns (bool)
{
whitelisted[_operator] = false;
emit WhitelistRemoved(_operator);
return true;
}
| /**
* @dev remove an address from the whitelist
* @param _operator address
* @return true if the address was removed from the whitelist,
* or the address wasn't in the whitelist in the first place
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1684,
1892
]
} | 3,771 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | SuccinctWhitelist | contract SuccinctWhitelist is Ownable {
mapping(address => bool) public whitelisted;
event WhitelistAdded(address indexed operator);
event WhitelistRemoved(address indexed operator);
/**
* @dev Throws if operator is not whitelisted.
* @param _operator address
*/
modifier onlyIfWhitelisted... | /**
* @title SuccinctWhitelist
* @dev The SuccinctWhitelist contract has a whitelist of addresses, and provides basic authorization control functions.
* Note: this is a succinct, straightforward and easy to understand implementation of openzeppelin-solidity's Whitelisted,
* but with full functionalities and API... | NatSpecMultiLine | removeAddressesFromWhitelist | function removeAddressesFromWhitelist(address[] _operators)
onlyOwner
public
returns (bool)
{
for (uint256 i = 0; i < _operators.length; i++) {
require(removeAddressFromWhitelist(_operators[i]));
}
return true;
}
| /**
* @dev remove addresses from the whitelist
* @param _operators addresses
* @return true if all addresses were removed from the whitelist,
* or weren't in the whitelist in the first place
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
2112,
2370
]
} | 3,772 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | CelerToken | contract CelerToken is PausableToken, SuccinctWhitelist {
string public constant name = "SexToken";
string public constant symbol = "SEX";
uint256 public constant decimals = 18;
// 10 billion tokens with 18 decimals
uint256 public constant INITIAL_SUPPLY = 1e28;
// Indicate whether token transfera... | /**
* @title CelerToken
* @dev Celer Network's token contract.
*/ | NatSpecMultiLine | transfer | function transfer(
address _to,
uint256 _value
)
public
onlyIfTransferable
onlyValidReceiver(_to)
returns (bool)
{
return super.transfer(_to, _value);
}
| /**
* @dev Extend parent behavior requiring transfer
* to respect transferability and receiver's validity.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
856,
1055
]
} | 3,773 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | CelerToken | contract CelerToken is PausableToken, SuccinctWhitelist {
string public constant name = "SexToken";
string public constant symbol = "SEX";
uint256 public constant decimals = 18;
// 10 billion tokens with 18 decimals
uint256 public constant INITIAL_SUPPLY = 1e28;
// Indicate whether token transfera... | /**
* @title CelerToken
* @dev Celer Network's token contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _value
)
public
onlyIfTransferable
onlyValidReceiver(_to)
returns (bool)
{
return super.transferFrom(_from, _to, _value);
}
| /**
* @dev Extend parent behavior requiring transferFrom
* to respect transferability and receiver's validity.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1188,
1422
]
} | 3,774 |
CelerToken | CelerToken.sol | 0xb555bcb2cadebfde53438ac5c329fea5f045a769 | Solidity | CelerToken | contract CelerToken is PausableToken, SuccinctWhitelist {
string public constant name = "SexToken";
string public constant symbol = "SEX";
uint256 public constant decimals = 18;
// 10 billion tokens with 18 decimals
uint256 public constant INITIAL_SUPPLY = 1e28;
// Indicate whether token transfera... | /**
* @title CelerToken
* @dev Celer Network's token contract.
*/ | NatSpecMultiLine | openTransfer | function openTransfer() external onlyOwner {
transferOpened = true;
}
| /**
* @dev Open token transferability.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://3633fb4531732896a451a3e6cce382e04e23cec15ba6f11964da7667b0d31bf2 | {
"func_code_index": [
1479,
1559
]
} | 3,775 |
FluxContract | FluxContract.sol | 0xb2993d177971165890f634f0e52f13d89160013a | Solidity | IERC20 | interface IERC20 {
//저는 7년 동안 한국에서 살았어요
//한국어능력시험
//대한민국
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(addre... | totalSupply | function totalSupply() external view returns (uint256);
| //저는 7년 동안 한국에서 살았어요
//한국어능력시험
//대한민국 | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://0ec466099f91e6050ea3d8f659be6ac94ec071296e0dbe88ad39334faa48fddc | {
"func_code_index": [
74,
134
]
} | 3,776 | ||
FluxContract | FluxContract.sol | 0xb2993d177971165890f634f0e52f13d89160013a | Solidity | SafeMath | library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: sub... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| //그 집은 한국에서 지어졌어요
//저는 한국에서 살고 있어요 | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://0ec466099f91e6050ea3d8f659be6ac94ec071296e0dbe88ad39334faa48fddc | {
"func_code_index": [
394,
589
]
} | 3,777 | ||
FluxContract | FluxContract.sol | 0xb2993d177971165890f634f0e52f13d89160013a | Solidity | Address | library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= ... | //저는 한국어를 한국에서 배웠어요
//그는 그녀의 호의를 순수하게 받아들였다 | LineComment | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| //번역 사이트 : 영어-> 한국어 / 한국어-> 영어 한국어를 배우는 학생들 당신의 고도를 결정하는 것은 당신의 적성 이 아니라 당신의 태도입니다
//저는 한국어를 한국에서 배웠어요 | LineComment | v0.6.6+commit.6c089d02 | None | ipfs://0ec466099f91e6050ea3d8f659be6ac94ec071296e0dbe88ad39334faa48fddc | {
"func_code_index": [
639,
817
]
} | 3,778 |
FluxContract | FluxContract.sol | 0xb2993d177971165890f634f0e52f13d89160013a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /*
Integer pharetra massa eget facilisis commodo.
Integer in dolor vitae eros pretium suscipit et scelerisque neque.
Duis condimentum justo ac volutpat consequat.
Curabitur id erat suscipit, pharetra neque ac, luctus urna.
Sed maximus augue et mauris interdum tristique.
Proin et sem viverra, fringilla massa... | Comment | v0.6.6+commit.6c089d02 | None | ipfs://0ec466099f91e6050ea3d8f659be6ac94ec071296e0dbe88ad39334faa48fddc | {
"func_code_index": [
12975,
13149
]
} | 3,779 | ||
FluxContract | FluxContract.sol | 0xb2993d177971165890f634f0e52f13d89160013a | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /*
Vivamus egestas neque eget ultrices hendrerit.
Donec elementum odio nec ex malesuada cursus.
Curabitur condimentum ante id ipsum porta ullamcorper.
Vivamus ut est elementum, interdum eros vitae, laoreet neque.
Pellentesque elementum risus tincidunt erat viverra hendrerit.
Donec nec velit ut lectus fringi... | Comment | v0.6.6+commit.6c089d02 | None | ipfs://0ec466099f91e6050ea3d8f659be6ac94ec071296e0dbe88ad39334faa48fddc | {
"func_code_index": [
17328,
17751
]
} | 3,780 | ||
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... | newSeries | function newSeries(uint256 seriesId, string memory name, string memory description, uint256[] memory patches, uint32 width, uint32 height) external onlyOwner {
require(seriesId == seriesConfigs.length, "Invalid new series ID");
seriesConfigs.push(Series({
name: name,
description: descri... | /**
* @dev Creates a new series of brots, based on the precomputed patches.
*
* The seriesId MUST be equal to seriesConfigs.length. This is a safety
* measure for automated deployment of multiple series in case an earlier
* transaction fails as series would otherwise be created out of order. This
* effectively ma... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
1850,
2437
]
} | 3,781 | ||||
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... | lockSeries | function lockSeries(uint256 seriesId) external seriesMustExist(seriesId) onlyOwner {
Series memory series = seriesConfigs[seriesId];
uint256 length;
for (uint i = 0; i < series.patches.length; i++) {
length += _brots.cachedPatch(series.patches[i]).pixels.length;
}
require(series.width * seri... | /**
* @dev Permanently lock the series to changes in pixels.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
2728,
3181
]
} | 3,782 | ||||
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... | setSeriesPatches | function setSeriesPatches(uint256 seriesId, uint256[] memory patches) external seriesMustExist(seriesId) seriesNotLocked(seriesId) onlyOwner {
seriesConfigs[seriesId].patches = patches;
emit SeriesPixelsChanged(seriesId);
}
| /**
* @dev Update the patches that govern series pixels.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3396,
3643
]
} | 3,783 | ||||
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... | setSeriesDimensions | function setSeriesDimensions(uint256 seriesId, uint32 width, uint32 height) external seriesMustExist(seriesId) seriesNotLocked(seriesId) onlyOwner {
seriesConfigs[seriesId].width = width;
seriesConfigs[seriesId].height = height;
emit SeriesPixelsChanged(seriesId);
}
| /**
* @dev Update the dimensions of the series.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
3710,
4008
]
} | 3,784 | ||||
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... | setSeriesDefaultPalette | function setSeriesDefaultPalette(uint256 seriesId, bytes memory palette) external seriesMustExist(seriesId) seriesNotLocked(seriesId) onlyOwner {
require(palette.length == 768, "256 colours required");
seriesConfigs[seriesId].defaultPalette = palette;
}
| /**
* @dev Update the default palette for a series when the token doesn't have one.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
4111,
4388
]
} | 3,785 | ||||
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... | setSeriesName | function setSeriesName(uint256 seriesId, string memory name) external seriesMustExist(seriesId) onlyOwner {
seriesConfigs[seriesId].name = name;
}
| /**
* @dev Update the series name.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
4442,
4604
]
} | 3,786 | ||||
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... | setSeriesDescription | function setSeriesDescription(uint256 seriesId, string memory description) external seriesMustExist(seriesId) onlyOwner {
seriesConfigs[seriesId].description = description;
}
| /**
* @dev Update the series description.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
4665,
4855
]
} | 3,787 | ||||
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... | setOnlyEarlyAccess | function setOnlyEarlyAccess(bool to) external onlyOwner {
onlyEarlyAccess = to;
emit OnlyEarlyAccess();
}
| /**
* @dev Set the onlyEarlyAccess flag.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
5782,
5911
]
} | 3,788 | ||||
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... | setEarlyAccessGrants | function setEarlyAccessGrants(EarlyAccess[] calldata addresses) external onlyOwner {
for (uint i = 0; i < addresses.length; i++) {
_earlyAccess[addresses[i].addr] = addresses[i].totalAllowed;
}
}
| /**
* @dev Set early-access granting or revocation for the addresses.
*
* The supply is not the amount left, but the total in the early-access
* phase.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6276,
6507
]
} | 3,789 | ||||
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... | earlyAccessFor | function earlyAccessFor(address addr) public view returns (uint256) {
return _earlyAccess[addr];
}
| /**
* @dev Returns the total early-access allocation for the address.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6596,
6710
]
} | 3,790 | ||||
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... | safeMintInSeries | function safeMintInSeries(uint256 seriesId) external seriesMustExist(seriesId) onlyOwner {
require(seriesConfigs[seriesId].numMinted < OWNER_ALLOCATION, "Don't be greedy");
_safeMintInSeries(seriesId);
}
| /**
* @dev Allow minting of the genesis pieces.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
6922,
7149
]
} | 3,791 | ||||
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... | safeMint | function safeMint() external payable {
require(msg.value >= MINT_PRICE, "Insufficient payment");
_asyncTransfer(owner(), msg.value);
uint256 numSeries = seriesConfigs.length;
// We need some sort of randomness to choose which series is issued
// next. sha3 is, by nature of being a cryptographic has... | /**
* @dev Mint one edition, from a randomly selected series.
*
* # NB see the bug described in _safeMintInSeries().
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
7295,
8610
]
} | 3,792 | ||||
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... | tokenSeries | function tokenSeries(uint256 tokenId) public pure returns (uint256) {
return tokenId / _tokenIdSeriesMultiplier;
}
| /**
* @dev Returns the seriesId of a token. The token may not exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
9284,
9414
]
} | 3,793 | ||||
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... | tokenEditionNum | function tokenEditionNum(uint256 tokenId) public pure returns (uint256) {
return tokenId % _tokenIdSeriesMultiplier;
}
| /**
* @dev Returns a token's edition within its series. The token may not exist.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
9514,
9648
]
} | 3,794 | ||||
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... | _safeMintInSeries | function _safeMintInSeries(uint256 seriesId) internal seriesMustExist(seriesId) {
/**
* ################################
* There is a bug in this code that we only discovered after deployment.
* A minter can move their piece to a different wallet, reducing their
* balance, and then mint again. S... | /**
* @dev Mints the next token in the series.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
9714,
11012
]
} | 3,795 | ||||
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... | approveForPalette | function approveForPalette(uint256 tokenId, address approved) external {
require(_isApprovedOrOwner(_msgSender(), tokenId), "Only owner or approver");
address owner = ownerOf(tokenId);
require(approved != owner, "Approving token owner");
tokenConfigs[tokenId].paletteApproval = approved;
emit... | /**
* @dev Approve the address to change the token's palette.
*
* Set to 0x00 address to revoke. Token owner and ERC721 approved already
* have palette approval. This is to allow someone else to modify a palette
* without the risk of them transferring the token.
*
* Revoked upon token transfer.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
11522,
11908
]
} | 3,796 | ||||
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... | resetPalette | function resetPalette(uint256 tokenId) approvedForPalette(tokenId) external {
require(tokenConfigs[tokenId].paletteReset == 0, "Already reset");
tokenConfigs[tokenId].paletteChanges++;
tokenConfigs[tokenId].paletteBy = address(0);
// Initial palette setting costs about 0.01 ETH at 30 gas but ch... | /**
* @dev Clear a token's palette, using the series default instead.
*
* Does not reset the paletteChanges count, but increments it.
*
* Emits TokenBMPChanged(tokenId);
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
12596,
13232
]
} | 3,797 | ||||
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... | setPalette | function setPalette(uint256 tokenId, bytes memory palette) approvedForPalette(tokenId) external {
require(palette.length == 768, "256 colours required");
tokenConfigs[tokenId].palette = palette;
tokenConfigs[tokenId].paletteChanges++;
tokenConfigs[tokenId].paletteBy = _msgSender();
tokenCon... | /**
* @dev Set a token's palette if an owner or has approval.
*
* Emits TokenBMPChanged(tokenId).
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
13359,
13788
]
} | 3,798 | ||||
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... | seriesPixels | function seriesPixels(uint256 seriesId) public view seriesMustExist(seriesId) returns (bytes memory) {
return _brots.concatenatePatches(seriesConfigs[seriesId].patches);
}
| /**
* @dev Concatenates a series' patches into a single array.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
13870,
14057
]
} | 3,799 | ||||
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... | pixelsOf | function pixelsOf(uint256 tokenId) public view returns (bytes memory) {
require(_exists(tokenId), "Token doesn't exist");
return seriesPixels(tokenSeries(tokenId));
}
| /**
* @dev Token equivalent of seriesPixels().
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
14123,
14313
]
} | 3,800 | ||||
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... | _tokenPalette | function _tokenPalette(uint256 tokenId) private view returns (bytes memory, bool) {
TokenConfig memory token = tokenConfigs[tokenId];
bytes memory palette = token.palette;
bool original = token.paletteReset == 1 || palette.length == 0;
if (original) {
palette = seriesConfigs[tokenSeries... | /**
* @dev Returns the effective token palette, considering resets.
*
* Boolean flag indicates whether it's the original palette; i.e. nothing is
* set or the palette has been explicitly reset().
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
14543,
15071
]
} | 3,801 | ||||
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... | bmpOf | function bmpOf(uint256 tokenId, uint32 scale) public view returns (bytes memory) {
require(_exists(tokenId), "Token doesn't exist");
Series memory series = seriesConfigs[tokenSeries(tokenId)];
(bytes memory palette, ) = _tokenPalette(tokenId);
bytes memory pixels = pixelsOf(tokenId);
if (sc... | /**
* @dev Returns the BMP-encoded token image, scaling pixels in both dimensions.
*
* Scale of 0 is treated as 1.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
15215,
15879
]
} | 3,802 | ||||
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... | bmpDataURIOf | function bmpDataURIOf(uint256 tokenId, uint32 scale) public view returns (string memory) {
return _bmp.bmpDataURI(bmpOf(tokenId, scale));
}
| /**
* @dev Equivalent to bmpOf() but encoded as a data URI to view in a browser.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
15979,
16134
]
} | 3,803 | ||||
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... | brooksMatelskiOf | function brooksMatelskiOf(uint256 tokenId, string memory characters) external view returns (string memory) {
bytes memory charset = abi.encodePacked(characters);
require(charset.length == 256, "256 characters");
Series memory series = seriesConfigs[tokenSeries(tokenId)];
// Include newlines except for ... | /**
* @dev Renders the token as an ASCII brot.
*
* This is an homage to Robert W Brooks and Peter Matelski who were the
* first to render the Mandelbrot, in this form.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
16336,
17265
]
} | 3,804 | ||||
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... | setBaseExternalUrl | function setBaseExternalUrl(string memory url) public onlyOwner {
_baseExternalUrl = url;
}
| /**
* @dev Set the base URL for external_url metadata field.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
17485,
17592
]
} | 3,805 | ||||
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... | tokenURI | function tokenURI(uint256 tokenId) public override view returns (string memory) {
TokenConfig memory token = tokenConfigs[tokenId];
Series memory series = seriesConfigs[tokenSeries(tokenId)];
uint256 editionNum = tokenEditionNum(tokenId);
bytes memory data = abi.encodePacked(
'data:application/... | /**
* @dev Returns data URI of token metadata.
*
* The BMP-encoded image is included in its own base64-encoded data URI.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | {
"func_code_index": [
17742,
19636
]
} | 3,806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.