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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | do4FriSteps | function do4FriSteps(
uint256 friHalfInvGroupPtr, uint256 evaluationsOnCosetPtr, uint256 cosetOffset_,
uint256 friEvalPoint)
internal pure returns (uint256 nextLayerValue, uint256 nextXInv) {
assembly {
let friEvalPointDivByXTessed
let PRIME := 0x800000000000011000000000000000000000000000000... | /*
This function reads 16 elements, and applies 8 + 4 + 2 + 1 fri transformation
to obtain a single element.
See do2FriSteps for more detailed explanation.
*/ | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
8951,
17547
]
} | 23,400 |
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | gatherCosetInputs | function gatherCosetInputs(
uint256 channelPtr, uint256 friCtx, uint256 friQueueHead_, uint256 cosetSize)
internal pure returns (uint256 friQueueHead, uint256 cosetIdx, uint256 cosetOffset_) {
uint256 evaluationsOnCosetPtr = friCtx + FRI_CTX_TO_COSET_EVALUATIONS_OFFSET;
uint256 friGroupPtr = friCtx + F... | /*
Gathers the "cosetSize" elements that belong to the same coset
as the item at the top of the FRI queue and stores them in ctx[MM_FRI_STEP_VALUES:].
Returns
friQueueHead - friQueueHead_ + 0x60 * (# elements that were taken from the queue).
cosetIdx - the start index of the coset that was gathered.
cosetOffse... | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
17973,
21107
]
} | 23,401 |
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | bitReverse | function bitReverse(uint256 num, uint256 numberOfBits)
internal pure
returns(uint256 numReversed)
{
assert((numberOfBits == 256) || (num < 2 ** numberOfBits));
uint256 n = num;
uint256 r = 0;
for (uint256 k = 0; k < numberOfBits; k++) {
r = (r * 2) | (n % 2);
n = n / 2;
}
ret... | /*
Returns the bit reversal of num assuming it has the given number of bits.
For example, if we have numberOfBits = 6 and num = (0b)1101 == (0b)001101,
the function will return (0b)101100.
*/ | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
21327,
21707
]
} | 23,402 |
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | initFriGroups | function initFriGroups(uint256 friCtx) internal view {
uint256 friGroupPtr = friCtx + FRI_CTX_TO_FRI_GROUP_OFFSET;
uint256 friHalfInvGroupPtr = friCtx + FRI_CTX_TO_FRI_HALF_INV_GROUP_OFFSET;
// FRI_GROUP_GEN is the coset generator.
// Raising it to the (MAX_COSET_SIZE - 1) power gives us the inverse.
... | /*
Initializes the FRI group and half inv group in the FRI context.
*/ | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
21794,
23601
]
} | 23,403 |
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | doFriSteps | function doFriSteps(
uint256 friCtx, uint256 friQueueTail, uint256 cosetOffset_, uint256 friEvalPoint,
uint256 friCosetSize, uint256 index, uint256 merkleQueuePtr)
internal pure {
uint256 friValue;
uint256 evaluationsOnCosetPtr = friCtx + FRI_CTX_TO_COSET_EVALUATIONS_OFFSET;
uint256 friHalfInvG... | /*
Operates on the coset of size friFoldedCosetSize that start at index.
It produces 3 outputs:
1. The field elements that result from doing FRI reductions on the coset.
2. The pointInv elements for the location that corresponds to the first output.
3. The root of a Merkle tree for the input layer.
The input ... | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
24130,
25820
]
} | 23,404 |
FriStatementContract | FriLayer.sol | 0xf6b83ccadeee478fc372af6ca7069b14fbc5e1b1 | Solidity | FriLayer | contract FriLayer is MerkleVerifier, PrimeFieldElement0 {
event LogGas(string name, uint256 val);
uint256 constant internal FRI_MAX_FRI_STEP = 4;
uint256 constant internal MAX_COSET_SIZE = 2**FRI_MAX_FRI_STEP;
// Generator of the group of size MAX_COSET_SIZE: GENERATOR_VAL**((PRIME - 1)/MAX_COSET_SIZE)... | /*
The main component of FRI is the FRI step which takes
the i-th layer evaluations on a coset c*<g> and produces a single evaluation in layer i+1.
To this end we have a friCtx that holds the following data:
evaluations: holds the evaluations on the coset we are currently working on.
group: holds the... | Comment | computeNextLayer | function computeNextLayer(
uint256 channelPtr, uint256 friQueuePtr, uint256 merkleQueuePtr, uint256 nQueries,
uint256 friEvalPoint, uint256 friCosetSize, uint256 friCtx)
internal pure returns (uint256 nLiveQueries) {
uint256 merkleQueueTail = merkleQueuePtr;
uint256 friQueueHead = friQueuePtr;
u... | /*
Computes the FRI step with eta = log2(friCosetSize) for all the live queries.
The input and output data is given in array of triplets:
(query index, FRI value, FRI inversed point)
in the address friQueuePtr (which is &ctx[mmFriQueue:]).
The function returns the number of live queries remaining after computing... | Comment | v0.6.11+commit.5ef660b1 | Apache-2.0 | ipfs://639f89cdd65932763cdcd067e21b2554ec697f4d1a96a60f6fe1937dbf1ed649 | {
"func_code_index": [
26477,
27451
]
} | 23,405 |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | Controlled | contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { require(msg.sender == controller); _; }
address public controller;
function Controlled() public { controller = msg.sender;}
/... | // produced by the Solididy File Flattener (c) David Appleton 2018
// contact : dave@akomba.com
// released under Apache 2.0 licence | LineComment | changeController | function changeController(address _newController) public onlyController {
controller = _newController;
}
| /// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
437,
560
]
} | 23,406 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
... | proxyPayment | function proxyPayment(address _owner) public payable returns(bool);
| /// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
246,
318
]
} | 23,407 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
... | onTransfer | function onTransfer(address _from, address _to, uint _amount) public returns(bool);
| /// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
664,
752
]
} | 23,408 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | TokenController | contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) public payable returns(bool);
... | onApprove | function onApprove(address _owner, address _spender, uint _amount) public
returns(bool);
| /// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
1119,
1221
]
} | 23,409 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | MiniMeToken | function MiniMeToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) public {
tokenFactory = MiniMeTokenFactory(_tokenFactory);
name = _tokenName; ... | ////////////////
/// @notice Constructor to create a MiniMeToken
/// @param _tokenFactory The address of the MiniMeTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new ... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
2764,
3514
]
} | 23,410 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | transfer | function transfer(address _to, uint256 _amount) public returns (bool success) {
require(transfersEnabled);
doTransfer(msg.sender, _to, _amount);
return true;
}
| ///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
3819,
4015
]
} | 23,411 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | transferFrom | function transferFrom(address _from, address _to, uint256 _amount
) public returns (bool success) {
// The controller of this contract can move tokens around at will,
// this is important to recognize! Confirm that you trust the
// controller of this contract, which in most situations should be
... | /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
4368,
5100
]
} | 23,412 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | doTransfer | function doTransfer(address _from, address _to, uint _amount
) internal {
if (_amount == 0) {
Transfer(_from, _to, _amount); // Follow the spec to louch the event when transfer 0
return;
}
require(parentSnapShotBlock < block.number);
// Do not allow tran... | /// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
5482,
7068
]
} | 23,413 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balanceOfAt(_owner, block.number);
}
| /// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
7202,
7343
]
} | 23,414 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | approve | function approve(address _spender, uint256 _amount) public returns (bool success) {
require(transfersEnabled);
// 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 de... | /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
7745,
8596
]
} | 23,415 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | allowance | function allowance(address _owner, address _spender
) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
8917,
9076
]
} | 23,416 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | approveAndCall | function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) public returns (bool success) {
require(approve(_spender, _amount));
ApproveAndCallFallBack(_spender).receiveApproval(
msg.sender,
_amount,
this,
_extraData
);
return true;
}
| /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
9597,
9956
]
} | 23,417 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | totalSupply | function totalSupply() public constant returns (uint) {
return totalSupplyAt(block.number);
}
| /// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
10079,
10191
]
} | 23,418 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | balanceOfAt | function balanceOfAt(address _owner, uint _blockNumber) public constant
returns (uint) {
// These next few lines are used when the balance of the token is
// requested before a check point was ever created for this token, it
// requires that the `parentToken.balanceOfAt` be queried at the
/... | ////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber` | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
10551,
11515
]
} | 23,419 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | totalSupplyAt | function totalSupplyAt(uint _blockNumber) public constant returns(uint) {
// These next few lines are used when the totalSupply of the token is
// requested before a check point was ever created for this token, it
// requires that the `parentToken.totalSupplyAt` be queried at the
// genesis blo... | /// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber` | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
11728,
12662
]
} | 23,420 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | createCloneToken | function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) public returns(address) {
if (_snapshotBlock == 0) _snapshotBlock = block.number;
MiniMeToken cloneToken = tokenFactory.createClone... | ////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snaps... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
13410,
14192
]
} | 23,421 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | generateTokens | function generateTokens(address _owner, uint _amount
) public onlyController returns (bool) {
uint curTotalSupply = totalSupply();
require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow
uint previousBalanceTo = balanceOf(_owner);
require(previousBalanceTo + _amount >= previousBa... | ////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
14528,
15119
]
} | 23,422 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | destroyTokens | function destroyTokens(address _owner, uint _amount
) onlyController public returns (bool) {
uint curTotalSupply = totalSupply();
require(curTotalSupply >= _amount);
uint previousBalanceFrom = balanceOf(_owner);
require(previousBalanceFrom >= _amount);
updateValueAtNow(totalSupplyHistory, curT... | /// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
15351,
15866
]
} | 23,423 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | enableTransfers | function enableTransfers(bool _transfersEnabled) public onlyController {
transfersEnabled = _transfersEnabled;
}
| ////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
16093,
16224
]
} | 23,424 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | getValueAt | function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
if (checkpoints.length == 0) return 0;
// Shortcut for the actual value
if (_block >= checkpoints[checkpoints.length-1].fromBlock)
return checkpoints[checkpoints.length-1].value;
if (_b... | ////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
16603,
17394
]
} | 23,425 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | updateValueAtNow | function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
if ((checkpoints.length == 0)
|| (checkpoints[checkpoints.length -1].fromBlock < block.number)) {
Checkpoint storage newCheckPoint = checkpoints[ checkpoints.length++ ];
newCheckPoint.fromBlock = ui... | /// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
17613,
18216
]
} | 23,426 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | isContract | function isContract(address _addr) constant internal returns(bool) {
uint size;
if (_addr == 0) return false;
assembly {
size := extcodesize(_addr)
}
return size>0;
}
| /// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
18387,
18621
]
} | 23,427 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | min | function min(uint a, uint b) pure internal returns (uint) {
return a < b ? a : b;
}
| /// @dev Helper function to return a min betwen the two uints | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
18691,
18793
]
} | 23,428 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | function () public payable {
require(isContract(controller));
require(TokenController(controller).proxyPayment.value(msg.value)(msg.sender));
}
| /// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
19037,
19208
]
} | 23,429 | ||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeToken | contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.2'; //An arbitra... | /// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign" | NatSpecSingleLine | claimTokens | function claimTokens(address _token) public onlyController {
if (_token == 0x0) {
controller.transfer(this.balance);
return;
}
MiniMeToken token = MiniMeToken(_token);
uint balance = token.balanceOf(this);
token.transfer(controller, balance);
ClaimedTokens(_token, contr... | //////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
19513,
19893
]
} | 23,430 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | MiniMeTokenFactory | contract MiniMeTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
///... | ////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class | NatSpecSingleLine | createCloneToken | function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) public returns (MiniMeToken) {
MiniMeToken newToken = new MiniMeToken(
this,
_parentToken,
_snapshotB... | /// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
688,
1272
]
} | 23,431 | |
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | LimitedTransferToken | contract LimitedTransferToken is ERC20 {
// Checks whether it can transfer or otherwise throws.
modifier canTransfer(address _sender, uint _value) {
require(_value < transferableTokens(_sender, uint64(now)));
_;
}
// Checks modifier and allows transfer if tokens are not locked.
function transfe... | transfer | function transfer(address _to, uint _value) canTransfer(msg.sender, _value) returns (bool) {
return super.transfer(_to, _value);
}
| // Checks modifier and allows transfer if tokens are not locked. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
302,
442
]
} | 23,432 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | LimitedTransferToken | contract LimitedTransferToken is ERC20 {
// Checks whether it can transfer or otherwise throws.
modifier canTransfer(address _sender, uint _value) {
require(_value < transferableTokens(_sender, uint64(now)));
_;
}
// Checks modifier and allows transfer if tokens are not locked.
function transfe... | transferFrom | function transferFrom(address _from, address _to, uint _value) canTransfer(_from, _value) returns (bool) {
return super.transferFrom(_from, _to, _value);
}
| // Checks modifier and allows transfer if tokens are not locked. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
513,
678
]
} | 23,433 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | LimitedTransferToken | contract LimitedTransferToken is ERC20 {
// Checks whether it can transfer or otherwise throws.
modifier canTransfer(address _sender, uint _value) {
require(_value < transferableTokens(_sender, uint64(now)));
_;
}
// Checks modifier and allows transfer if tokens are not locked.
function transfe... | transferableTokens | function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
return balanceOf(holder);
}
| // Default transferable tokens function returns all tokens for a holder (no limit). | LineComment | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
768,
899
]
} | 23,434 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | grantVestedTokens | function grantVestedTokens(
address _to,
uint256 _value,
uint64 _start,
uint64 _cliff,
uint64 _vesting,
bool _revokable,
bool _burnsOnRevoke
) onlyController public {
// Check for date inconsistencies that may cause unexpected behavior
require(_cliff > _start && _vesting > _cliff);
re... | /**
* @dev Grant tokens to a specified address
* @param _to address The address which the tokens will be granted to.
* @param _value uint256 The amount of tokens to be granted.
* @param _start uint64 Time of the beginning of the grant.
* @param _cliff uint64 Time of the cliff period.
* @param _vesting uint6... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
979,
1969
]
} | 23,435 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | revokeTokenGrant | function revokeTokenGrant(address _holder, uint _grantId) public {
TokenGrant storage grant = grants[_holder][_grantId];
require(grant.revokable); // Check if grant was revokable
require(grant.granter == msg.sender); // Only granter can revoke it
require(_grantId >= grants[_holder].length);
address r... | /**
* @dev Revoke the grant of tokens of a specifed address.
* @param _holder The address which will have its tokens revoked.
* @param _grantId The id of the token grant.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
2165,
3015
]
} | 23,436 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | revokeAllTokenGrants | function revokeAllTokenGrants(address _holder) {
var grantsCount = tokenGrantsCount(_holder);
for (uint i = 0; i < grantsCount; i++) {
revokeTokenGrant(_holder, 0);
}
}
| /**
* @dev Revoke all grants of tokens of a specifed address.
* @param _holder The address which will have its tokens revoked.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
3163,
3379
]
} | 23,437 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | transferableTokens | function transferableTokens(address holder, uint64 time) constant public returns (uint256) {
uint256 grantIndex = tokenGrantsCount(holder);
if (grantIndex == 0) return balanceOf(holder); // shortcut for holder without grants
// Iterate through all the grants the holder has, and add all non-vested tokens
... | /**
* @dev Calculate the total amount of transferable tokens of a holder at a given time
* @param holder address The address of the holder
* @param time uint64 The specific time.
* @return An uint representing a holder's total amount of transferable tokens.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
3666,
4597
]
} | 23,438 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | tokenGrantsCount | function tokenGrantsCount(address _holder) constant returns (uint index) {
return grants[_holder].length;
}
| /**
* @dev Check the amount of grants that an address has.
* @param _holder The holder of the grants.
* @return A uint representing the total amount of grants.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
4782,
4900
]
} | 23,439 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | calculateVestedTokens | function calculateVestedTokens(
uint256 tokens,
uint256 time,
uint256 start,
uint256 cliff,
uint256 vesting) constant returns (uint256)
{
// Shortcuts for before cliff and after vesting cases.
if (time < cliff) return 0;
if (time >= vesting) return tokens;
// Interpolate all vest... | /**
* @dev Calculate amount of vested tokens at a specifc time.
* @param tokens uint256 The amount of tokens grantted.
* @param time uint64 The time to be checked
* @param start uint64 A time representing the begining of the grant
* @param cliff uint64 The cliff period.
* @param vesting uint64 The vesting p... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
5827,
6784
]
} | 23,440 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | tokenGrant | function tokenGrant(address _holder, uint _grantId) constant returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
TokenGrant storage grant = grants[_holder][_grantId];
granter = grant.granter;
value = grant.value;
start ... | /**
* @dev Get all information about a specifc grant.
* @param _holder The address which will have its tokens revoked.
* @param _grantId The id of the token grant.
* @return Returns all the values that represent a TokenGrant(address, value, start, cliff,
* revokability, burnsOnRevoke, and vesting) plus the ve... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
7159,
7691
]
} | 23,441 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | vestedTokens | function vestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
return calculateVestedTokens(
grant.value,
uint256(time),
uint256(grant.start),
uint256(grant.cliff),
uint256(grant.vesting)
);
}
| /**
* @dev Get the amount of vested tokens at a specific time.
* @param grant TokenGrant The grant to be checked.
* @param time The time to be checked
* @return An uint representing the amount of vested tokens of a specific grant at a specific time.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
7970,
8240
]
} | 23,442 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | nonVestedTokens | function nonVestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
return grant.value.sub(vestedTokens(grant, time));
}
| /**
* @dev Calculate the amount of non vested tokens at a specific time.
* @param grant TokenGrant The grant to be checked.
* @param time uint64 The time to be checked
* @return An uint representing the amount of non vested tokens of a specifc grant on the
* passed time frame.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
8551,
8707
]
} | 23,443 | |||
AywakeToken | AywakeToken.sol | 0x88e51d12d75180556a5fd59770d62f8adf7fa703 | Solidity | VestedToken | contract VestedToken is LimitedTransferToken, Controlled {
using SafeMath for uint;
uint256 MAX_GRANTS_PER_ADDRESS = 20;
struct TokenGrant {
address granter; // 20 bytes
uint256 value; // 32 bytes
uint64 cliff;
uint64 vesting;
uint64 start; // 3 * 8 = 24 bytes
... | lastTokenIsTransferableDate | function lastTokenIsTransferableDate(address holder) constant public returns (uint64 date) {
date = uint64(now);
uint256 grantIndex = grants[holder].length;
for (uint256 i = 0; i < grantIndex; i++) {
date = SafeMath.max64(grants[holder][i].vesting, date);
}
}
| /**
* @dev Calculate the date when the holder can trasfer all its tokens
* @param holder address The address of the holder
* @return An uint representing the date of the last transferable tokens.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://b1325437285d49fd44ae731de36c2aa00b98c7d32c0daf60dbb493c725430791 | {
"func_code_index": [
8928,
9220
]
} | 23,444 | |||
EWSToken | EWSToken.sol | 0xf7737361b538841a7157cafe5e932b27eac42f90 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 r... | /**
* @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 | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | None | bzzr://337141f5b3df1e3c1fa2539e581b2e6c57ab113472fe7b35c07f3ab9fcefb585 | {
"func_code_index": [
380,
492
]
} | 23,445 |
EWSToken | EWSToken.sol | 0xf7737361b538841a7157cafe5e932b27eac42f90 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 r... | /**
* @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 | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return ... | /**
* @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 | None | bzzr://337141f5b3df1e3c1fa2539e581b2e6c57ab113472fe7b35c07f3ab9fcefb585 | {
"func_code_index": [
654,
999
]
} | 23,446 |
EWSToken | EWSToken.sol | 0xf7737361b538841a7157cafe5e932b27eac42f90 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 r... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
var _allowance = allowed[_from][msg.sender];
require(_to != address(0));
require (_value <= _allowance);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][ms... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | None | bzzr://337141f5b3df1e3c1fa2539e581b2e6c57ab113472fe7b35c07f3ab9fcefb585 | {
"func_code_index": [
1279,
1707
]
} | 23,447 |
EWSToken | EWSToken.sol | 0xf7737361b538841a7157cafe5e932b27eac42f90 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 r... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
// 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... | /**
* @dev Approve 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 | None | bzzr://337141f5b3df1e3c1fa2539e581b2e6c57ab113472fe7b35c07f3ab9fcefb585 | {
"func_code_index": [
1943,
2494
]
} | 23,448 |
EWSToken | EWSToken.sol | 0xf7737361b538841a7157cafe5e932b27eac42f90 | Solidity | StandardToken | contract StandardToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 r... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | None | bzzr://337141f5b3df1e3c1fa2539e581b2e6c57ab113472fe7b35c07f3ab9fcefb585 | {
"func_code_index": [
2818,
2959
]
} | 23,449 |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
89,
266
]
} | 23,450 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
350,
630
]
} | 23,451 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
744,
860
]
} | 23,452 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
924,
1054
]
} | 23,453 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
199,
287
]
} | 23,454 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
445,
777
]
} | 23,455 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
983,
1087
]
} | 23,456 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
401,
858
]
} | 23,457 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
1490,
1685
]
} | 23,458 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
2009,
2140
]
} | 23,459 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
2606,
2875
]
} | 23,460 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approva... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
3346,
3761
]
} | 23,461 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | ERC827Token | contract ERC827Token is ERC827, StandardToken {
/**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the o... | /**
* @title ERC827, an extension of ERC20 token standard
*
* @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and
* @dev approvals.
*
* @dev Uses OpenZeppelin StandardToken.
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _data) public payable returns (bool) {
require(_spender != address(this));
super.approve(_spender, _value);
// solium-disable-next-line security/no-call-value
require(_spender.call.value(msg.value)(_data));
return true;
}
| /**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the old and the new allowance by unfortunate
* @dev transaction or... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
901,
1223
]
} | 23,462 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | ERC827Token | contract ERC827Token is ERC827, StandardToken {
/**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the o... | /**
* @title ERC827, an extension of ERC20 token standard
*
* @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and
* @dev approvals.
*
* @dev Uses OpenZeppelin StandardToken.
*/ | NatSpecMultiLine | transferAndCall | function transferAndCall(address _to, uint256 _value, bytes _data) public payable returns (bool) {
require(_to != address(this));
super.transfer(_to, _value);
// solium-disable-next-line security/no-call-value
require(_to.call.value(msg.value)(_data));
return true;
}
| /**
* @dev Addition to ERC20 token methods. Transfer tokens to a specified
* @dev address and execute a call with the sent data on the same transaction
*
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
* @param _data ABI-encoded con... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
1674,
1976
]
} | 23,463 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | ERC827Token | contract ERC827Token is ERC827, StandardToken {
/**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the o... | /**
* @title ERC827, an extension of ERC20 token standard
*
* @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and
* @dev approvals.
*
* @dev Uses OpenZeppelin StandardToken.
*/ | NatSpecMultiLine | transferFromAndCall | function transferFromAndCall(
address _from,
address _to,
uint256 _value,
bytes _data
)
public payable returns (bool)
{
require(_to != address(this));
super.transferFrom(_from, _to, _value);
// solium-disable-next-line security/no-call-value
require(_to.call.value(msg.value)(_data));
... | /**
* @dev Addition to ERC20 token methods. Transfer tokens from one address to
* @dev another and make a contract call on the same transaction
*
* @param _from The address which you want to send tokens from
* @param _to The address which you want to transfer to
* @param _value The amout of tokens to be tra... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
2470,
2835
]
} | 23,464 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | ERC827Token | contract ERC827Token is ERC827, StandardToken {
/**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the o... | /**
* @title ERC827, an extension of ERC20 token standard
*
* @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and
* @dev approvals.
*
* @dev Uses OpenZeppelin StandardToken.
*/ | NatSpecMultiLine | increaseApprovalAndCall | function increaseApprovalAndCall(address _spender, uint _addedValue, bytes _data) public payable returns (bool) {
require(_spender != address(this));
super.increaseApproval(_spender, _addedValue);
// solium-disable-next-line security/no-call-value
require(_spender.call.value(msg.value)(_data));
ret... | /**
* @dev Addition to StandardToken methods. Increase the amount of tokens that
* @dev an owner allowed to a spender and execute a call with the sent data.
*
* @dev approve should be called when allowed[_spender] == 0. To increment
* @dev allowed value is better to use this function to avoid 2 calls (and wai... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
3484,
3831
]
} | 23,465 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | ERC827Token | contract ERC827Token is ERC827, StandardToken {
/**
* @dev Addition to ERC20 token methods. It allows to
* @dev approve the transfer of value and execute a call with the sent data.
*
* @dev Beware that changing an allowance with this method brings the risk that
* @dev someone may use both the o... | /**
* @title ERC827, an extension of ERC20 token standard
*
* @dev Implementation the ERC827, following the ERC20 standard with extra
* @dev methods to transfer value and data and execute calls in transfers and
* @dev approvals.
*
* @dev Uses OpenZeppelin StandardToken.
*/ | NatSpecMultiLine | decreaseApprovalAndCall | function decreaseApprovalAndCall(address _spender, uint _subtractedValue, bytes _data) public payable returns (bool) {
require(_spender != address(this));
super.decreaseApproval(_spender, _subtractedValue);
// solium-disable-next-line security/no-call-value
require(_spender.call.value(msg.value)(_data))... | /**
* @dev Addition to StandardToken methods. Decrease the amount of tokens that
* @dev an owner allowed to a spender and execute a call with the sent data.
*
* @dev approve should be called when allowed[_spender] == 0. To decrement
* @dev allowed value is better to use this function to avoid 2 calls (and wai... | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
4485,
4842
]
} | 23,466 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
257,
317
]
} | 23,467 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
636,
817
]
} | 23,468 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
513,
609
]
} | 23,469 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/ | NatSpecMultiLine | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
693,
791
]
} | 23,470 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Claimable | contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
}
/**
* @dev Allows the current owner to set the pendingOwner ad... | /**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
pendingOwner = newOwner;
}
| /**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
395,
496
]
} | 23,471 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | Claimable | contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
require(msg.sender == pendingOwner);
_;
}
/**
* @dev Allows the current owner to set the pendingOwner ad... | /**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/ | NatSpecMultiLine | claimOwnership | function claimOwnership() onlyPendingOwner public {
emit OwnershipTransferred(owner, pendingOwner);
owner = pendingOwner;
pendingOwner = address(0);
}
| /**
* @dev Allows the pendingOwner address to finalize the transfer.
*/ | NatSpecMultiLine | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
582,
753
]
} | 23,472 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | MainframeToken | contract MainframeToken is ERC827Token, Pausable, Claimable {
string public constant name = "Mainframe Token";
string public constant symbol = "MFT";
uint8 public constant decimals = 18;
address public distributor;
modifier validDestination(address to) {
require(to != address(this));
_;
}... | /**
* @title MainframeToken
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public validDestination(to) isTradeable returns (bool) {
return super.transfer(to, value);
}
| // ERC20 Methods | LineComment | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
709,
857
]
} | 23,473 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | MainframeToken | contract MainframeToken is ERC827Token, Pausable, Claimable {
string public constant name = "Mainframe Token";
string public constant symbol = "MFT";
uint8 public constant decimals = 18;
address public distributor;
modifier validDestination(address to) {
require(to != address(this));
_;
}... | /**
* @title MainframeToken
*/ | NatSpecMultiLine | transferAndCall | function transferAndCall(address to, uint256 value, bytes data) public payable isTradeable returns (bool) {
return super.transferAndCall(to, value, data);
}
| // ERC827 Methods | LineComment | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
1536,
1703
]
} | 23,474 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | MainframeToken | contract MainframeToken is ERC827Token, Pausable, Claimable {
string public constant name = "Mainframe Token";
string public constant symbol = "MFT";
uint8 public constant decimals = 18;
address public distributor;
modifier validDestination(address to) {
require(to != address(this));
_;
}... | /**
* @title MainframeToken
*/ | NatSpecMultiLine | setDistributor | function setDistributor(address newDistributor) external onlyOwner {
distributor = newDistributor;
}
| // Setters | LineComment | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
2514,
2625
]
} | 23,475 | |
MainframeToken | MainframeToken.sol | 0x46627f7f7f41197a47528c52cdd2f4575b49cc56 | Solidity | MainframeToken | contract MainframeToken is ERC827Token, Pausable, Claimable {
string public constant name = "Mainframe Token";
string public constant symbol = "MFT";
uint8 public constant decimals = 18;
address public distributor;
modifier validDestination(address to) {
require(to != address(this));
_;
}... | /**
* @title MainframeToken
*/ | NatSpecMultiLine | emergencyERC20Drain | function emergencyERC20Drain(ERC20 token, uint256 amount) external onlyOwner {
// owner can drain tokens that are sent here by mistake
token.transfer(owner, amount);
}
| // Token Drain | LineComment | v0.4.25-nightly.2018.6.3+commit.ef8fb63b | bzzr://df7fb9eb4c86db8ccff8f9d3010e4a108b16b6c24b515b79bcd9be1f60267cfc | {
"func_code_index": [
2648,
2831
]
} | 23,476 | |
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
94,
154
]
} | 23,477 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
238,
311
]
} | 23,478 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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);
/... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
536,
618
]
} | 23,479 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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);
/... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
898,
986
]
} | 23,480 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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);
/... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
1651,
1730
]
} | 23,481 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | 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);
/... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
2044,
2180
]
} | 23,482 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns... | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
100,
159
]
} | 23,483 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns... | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
227,
288
]
} | 23,484 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns... | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
365,
420
]
} | 23,485 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
817,
922
]
} | 23,486 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
1037,
1146
]
} | 23,487 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
}
| /**
* @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.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
1781,
1879
]
} | 23,488 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
1940,
2053
]
} | 23,489 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
2112,
2244
]
} | 23,490 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_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.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
2453,
2633
]
} | 23,491 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
2692,
2848
]
} | 23,492 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | 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.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
2991,
3165
]
} | 23,493 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(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 `... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
3643,
4003
]
} | 23,494 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
4408,
4631
]
} | 23,495 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
5130,
5404
]
} | 23,496 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | _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);
... | /**
* @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.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
5890,
6470
]
} | 23,497 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Trans... | /** @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:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
6753,
7138
]
} | 23,498 | ||
DOGEJO | DOGEJO.sol | 0xb9d08264144217ad4765bed6f9bf4d6e2f47ee31 | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | _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 = _... | /**
* @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.8.9+commit.e5eed63a | MIT | ipfs://732b2e15c6eec723733b338bf23c48bd9dc4a2e6181f19bd989b76b8e934ff10 | {
"func_code_index": [
7467,
7892
]
} | 23,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.