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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | 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... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1485,
1675
]
} | 707 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | 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... | 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.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1999,
2130
]
} | 708 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | 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... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
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.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2596,
2860
]
} | 709 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | 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... | 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);
}
Approval(msg... | /**
* @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.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
3331,
3741
]
} | 710 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
483,
756
]
} | 711 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
873,
1015
]
} | 712 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DisbursementHandler | contract DisbursementHandler is Ownable {
struct Disbursement {
uint256 timestamp;
uint256 tokens;
}
event LogSetup(address indexed vestor, uint256 tokens, uint256 timestamp);
event LogChangeTimestamp(address indexed vestor, uint256 index, uint256 timestamp);
event LogWith... | setupDisbursement | function setupDisbursement(
address vestor,
uint256 tokens,
uint256 timestamp
)
public
onlyOwner
{
require(block.timestamp < timestamp);
disbursements[vestor].push(Disbursement(timestamp, tokens));
LogSetup(vestor, timestamp, tokens);
}
| /// @dev Called by the sale contract to create a disbursement.
/// @param vestor The address of the beneficiary.
/// @param tokens Amount of tokens to be locked.
/// @param timestamp Funds will be locked until this timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
856,
1184
]
} | 713 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DisbursementHandler | contract DisbursementHandler is Ownable {
struct Disbursement {
uint256 timestamp;
uint256 tokens;
}
event LogSetup(address indexed vestor, uint256 tokens, uint256 timestamp);
event LogChangeTimestamp(address indexed vestor, uint256 index, uint256 timestamp);
event LogWith... | changeTimestamp | function changeTimestamp(
address vestor,
uint256 index,
uint256 timestamp
)
public
onlyOwner
{
require(block.timestamp < timestamp);
require(index < disbursements[vestor].length);
disbursements[vestor][index].timestamp = timestamp;
LogChangeTimestamp(vestor, index, timest... | /// @dev Change an existing disbursement.
/// @param vestor The address of the beneficiary.
/// @param timestamp Funds will be locked until this timestamp.
/// @param index Index of the DisbursementVesting in the vesting array. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1435,
1816
]
} | 714 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DisbursementHandler | contract DisbursementHandler is Ownable {
struct Disbursement {
uint256 timestamp;
uint256 tokens;
}
event LogSetup(address indexed vestor, uint256 tokens, uint256 timestamp);
event LogChangeTimestamp(address indexed vestor, uint256 index, uint256 timestamp);
event LogWith... | withdraw | function withdraw(address to, uint256 value)
public
{
uint256 maxTokens = calcMaxWithdraw();
uint256 withdrawAmount = value < maxTokens ? value : maxTokens;
withdrawnTokens[msg.sender] = SafeMath.add(withdrawnTokens[msg.sender], withdrawAmount);
token.transfer(to, withdrawAmount);
LogWith... | /// @dev Transfers tokens to a given address
/// @param to Address of token receiver
/// @param value Number of tokens to transfer | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1965,
2341
]
} | 715 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DisbursementHandler | contract DisbursementHandler is Ownable {
struct Disbursement {
uint256 timestamp;
uint256 tokens;
}
event LogSetup(address indexed vestor, uint256 tokens, uint256 timestamp);
event LogChangeTimestamp(address indexed vestor, uint256 index, uint256 timestamp);
event LogWith... | calcMaxWithdraw | function calcMaxWithdraw()
public
constant
returns (uint256)
{
uint256 maxTokens = 0;
Disbursement[] storage temp = disbursements[msg.sender];
for (uint256 i = 0; i < temp.length; i++) {
if (block.timestamp > temp[i].timestamp) {
maxTokens = SafeMath.add(maxTokens, t... | /// @dev Calculates the maximum amount of vested tokens
/// @return Number of vested tokens to withdraw | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2458,
2969
]
} | 716 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachineLib | library StateMachineLib {
struct Stage {
// The id of the next stage
bytes32 nextId;
// The identifiers for the available functions in each stage
mapping(bytes4 => bool) allowedFunctions;
}
struct State {
// The current stage id
bytes32 currentS... | setInitialStage | function setInitialStage(State storage self, bytes32 stageId) internal {
self.validStage[stageId] = true;
self.currentStageId = stageId;
}
| /// @dev Creates and sets the initial stage. It has to be called before creating any transitions.
/// @param stageId The id of the (new) stage to set as initial stage. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
816,
982
]
} | 717 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachineLib | library StateMachineLib {
struct Stage {
// The id of the next stage
bytes32 nextId;
// The identifiers for the available functions in each stage
mapping(bytes4 => bool) allowedFunctions;
}
struct State {
// The current stage id
bytes32 currentS... | createTransition | function createTransition(State storage self, bytes32 fromId, bytes32 toId) internal {
require(self.validStage[fromId]);
Stage storage from = self.stages[fromId];
// Invalidate the stage that won't be reachable any more
if (from.nextId != 0) {
self.validStage[from.nextId] = false;
... | /// @dev Creates a transition from 'fromId' to 'toId'. If fromId already had a nextId, it deletes the now unreachable stage.
/// @param fromId The id of the stage from which the transition begins.
/// @param toId The id of the stage that will be reachable from "fromId". | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1271,
1744
]
} | 718 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachineLib | library StateMachineLib {
struct Stage {
// The id of the next stage
bytes32 nextId;
// The identifiers for the available functions in each stage
mapping(bytes4 => bool) allowedFunctions;
}
struct State {
// The current stage id
bytes32 currentS... | goToNextStage | function goToNextStage(State storage self) internal {
Stage storage current = self.stages[self.currentStageId];
require(self.validStage[current.nextId]);
self.currentStageId = current.nextId;
self.onTransition(current.nextId);
}
| /// @dev Goes to the next stage if posible (if the next stage is valid) | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1824,
2104
]
} | 719 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachineLib | library StateMachineLib {
struct Stage {
// The id of the next stage
bytes32 nextId;
// The identifiers for the available functions in each stage
mapping(bytes4 => bool) allowedFunctions;
}
struct State {
// The current stage id
bytes32 currentS... | checkAllowedFunction | function checkAllowedFunction(State storage self, bytes4 selector) internal constant returns(bool) {
return self.stages[self.currentStageId].allowedFunctions[selector];
}
| /// @dev Checks if the a function is allowed in the current stage.
/// @param selector A function selector (bytes4[keccak256(functionSignature)])
/// @return true If the function is allowed in the current stage | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2333,
2522
]
} | 720 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachineLib | library StateMachineLib {
struct Stage {
// The id of the next stage
bytes32 nextId;
// The identifiers for the available functions in each stage
mapping(bytes4 => bool) allowedFunctions;
}
struct State {
// The current stage id
bytes32 currentS... | allowFunction | function allowFunction(State storage self, bytes32 stageId, bytes4 selector) internal {
require(self.validStage[stageId]);
self.stages[stageId].allowedFunctions[selector] = true;
}
| /// @dev Allow a function in the given stage.
/// @param stageId The id of the stage
/// @param selector A function selector (bytes4[keccak256(functionSignature)]) | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2704,
2912
]
} | 721 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachine | contract StateMachine {
using StateMachineLib for StateMachineLib.State;
event LogTransition(bytes32 indexed stageId, uint256 blockNumber);
StateMachineLib.State internal state;
/* This modifier performs the conditional transitions and checks that the function
* to be executed is allowe... | getCurrentStageId | function getCurrentStageId() public view returns(bytes32) {
return state.currentStageId;
}
| /// @dev Gets the current stage id.
/// @return The current stage id. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
744,
853
]
} | 722 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachine | contract StateMachine {
using StateMachineLib for StateMachineLib.State;
event LogTransition(bytes32 indexed stageId, uint256 blockNumber);
StateMachineLib.State internal state;
/* This modifier performs the conditional transitions and checks that the function
* to be executed is allowe... | conditionalTransitions | function conditionalTransitions() public {
bytes32 nextId = state.stages[state.currentStageId].nextId;
while (state.validStage[nextId]) {
StateMachineLib.Stage storage next = state.stages[nextId];
// If the next stage's condition is true, go to next stage and continue
if (startC... | /// @dev Performs conditional transitions. Can be called by anyone. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
929,
1452
]
} | 723 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachine | contract StateMachine {
using StateMachineLib for StateMachineLib.State;
event LogTransition(bytes32 indexed stageId, uint256 blockNumber);
StateMachineLib.State internal state;
/* This modifier performs the conditional transitions and checks that the function
* to be executed is allowe... | startConditions | function startConditions(bytes32) internal constant returns(bool) {
return false;
}
| /// @dev Determines whether the conditions for transitioning to the given stage are met.
/// @return true if the conditions are met for the given stageId. False by default (must override in child contracts). | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1673,
1775
]
} | 724 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StateMachine | contract StateMachine {
using StateMachineLib for StateMachineLib.State;
event LogTransition(bytes32 indexed stageId, uint256 blockNumber);
StateMachineLib.State internal state;
/* This modifier performs the conditional transitions and checks that the function
* to be executed is allowe... | onTransition | function onTransition(bytes32 stageId) internal {
LogTransition(stageId, block.number);
}
| /// @dev Callback called when there is a stage transition. It should be overridden for additional functionality. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1896,
2004
]
} | 725 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | TimedStateMachine | contract TimedStateMachine is StateMachine {
event LogSetStageStartTime(bytes32 indexed stageId, uint256 startTime);
// Stores the start timestamp for each stage (the value is 0 if the stage doesn't have a start timestamp).
mapping(bytes32 => uint256) internal startTime;
/// @dev This function... | startConditions | function startConditions(bytes32 stageId) internal constant returns(bool) {
// Get the startTime for stage
uint256 start = startTime[stageId];
// If the startTime is set and has already passed, return true.
return start != 0 && block.timestamp > start;
}
| /// @dev This function overrides the startConditions function in the parent contract in order to enable automatic transitions that depend on the timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
455,
755
]
} | 726 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | TimedStateMachine | contract TimedStateMachine is StateMachine {
event LogSetStageStartTime(bytes32 indexed stageId, uint256 startTime);
// Stores the start timestamp for each stage (the value is 0 if the stage doesn't have a start timestamp).
mapping(bytes32 => uint256) internal startTime;
/// @dev This function... | setStageStartTime | function setStageStartTime(bytes32 stageId, uint256 timestamp) internal {
require(state.validStage[stageId]);
require(timestamp > block.timestamp);
startTime[stageId] = timestamp;
LogSetStageStartTime(stageId, timestamp);
}
| /// @dev Sets the starting timestamp for a stage.
/// @param stageId The id of the stage for which we want to set the start timestamp.
/// @param timestamp The start timestamp for the given stage. It should be bigger than the current one. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1012,
1283
]
} | 727 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | TimedStateMachine | contract TimedStateMachine is StateMachine {
event LogSetStageStartTime(bytes32 indexed stageId, uint256 startTime);
// Stores the start timestamp for each stage (the value is 0 if the stage doesn't have a start timestamp).
mapping(bytes32 => uint256) internal startTime;
/// @dev This function... | getStageStartTime | function getStageStartTime(bytes32 stageId) public view returns(uint256) {
return startTime[stageId];
}
| /// @dev Returns the timestamp for the given stage id.
/// @param stageId The id of the stage for which we want to set the start timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1436,
1558
]
} | 728 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | setSaleStartTime | function setSaleStartTime(uint256 timestamp)
external
onlyOwner
checkAllowed
{
// require(_startTime < getStageStartTime(SALE_ENDED));
setStageStartTime(SALE_IN_PROGRESS, timestamp);
}
| /// @dev Sets the start timestamp for the SALE_IN_PROGRESS stage.
/// @param timestamp The start timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1500,
1747
]
} | 729 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | setSaleEndTime | function setSaleEndTime(uint256 timestamp)
external
onlyOwner
checkAllowed
{
require(getStageStartTime(SALE_IN_PROGRESS) < timestamp);
setStageStartTime(SALE_ENDED, timestamp);
}
| /// @dev Sets the start timestamp for the SALE_ENDED stage.
/// @param timestamp The start timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1862,
2103
]
} | 730 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | setupDone | function setupDone()
public
onlyOwner
checkAllowed
{
uint256 _startTime = getStageStartTime(SALE_IN_PROGRESS);
uint256 _endTime = getStageStartTime(SALE_ENDED);
require(block.timestamp < _startTime);
require(_startTime < _endTime);
state.goToNextStage();
}
| /// @dev Called in the SETUP stage, check configurations and to go to the SETUP_DONE stage. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2203,
2551
]
} | 731 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | contribute | function contribute()
public
payable
checkAllowed
{
require(msg.value > 0);
uint256 contributionLimit = getContributionLimit(msg.sender);
require(contributionLimit > 0);
// Check that the user is allowed to contribute
uint256 totalContribution = contributions[msg.sende... | /// @dev Called by users to contribute ETH to the sale. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
2615,
4214
]
} | 732 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | distributeTimelockedTokens | function distributeTimelockedTokens(
address beneficiary,
uint256 tokenAmount,
uint256 timestamp
)
public
onlyOwner
checkAllowed
{
disbursementHandler.setupDisbursement(
beneficiary,
tokenAmount,
timestamp
);
token.mint(disbursementHandler, tok... | /// @dev Create a disbursement of tokens.
/// @param beneficiary The beneficiary of the disbursement.
/// @param tokenAmount Amount of tokens to be locked.
/// @param timestamp Tokens will be locked until this timestamp. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
4458,
4908
]
} | 733 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | createTokenContract | function createTokenContract() internal returns (MintableToken);
| // Override in the child sales | LineComment | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
5659,
5728
]
} | 734 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | startConditions | function startConditions(bytes32 stageId) internal constant returns (bool) {
// If the cap has been reached, end the sale.
if (stageId == SALE_ENDED && contributionCap <= weiContributed) {
return true;
}
return super.startConditions(stageId);
}
| /// @dev Stage start conditions. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
5856,
6159
]
} | 735 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | onTransition | function onTransition(bytes32 stageId) internal {
if (stageId == SALE_ENDED) {
onSaleEnded();
}
super.onTransition(stageId);
}
| /// @dev State transitions callbacks. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
6205,
6383
]
} | 736 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Sale | contract Sale is Ownable, TimedStateMachine {
using SafeMath for uint256;
event LogContribution(address indexed contributor, uint256 amountSent, uint256 excessRefunded);
event LogTokenAllocation(address indexed contributor, uint256 contribution, uint256 tokens);
event LogDisbursement(address index... | onSaleEnded | function onSaleEnded() internal {}
| /// @dev Callback that gets called when entering the SALE_ENDED stage. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
6462,
6501
]
} | 737 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | ERC223ReceivingContract | contract ERC223ReceivingContract {
/// @dev Standard ERC223 function that will handle incoming token transfers.
/// @param _from Token sender address.
/// @param _value Amount of tokens.
/// @param _data Transaction metadata.
function tokenFallback(address _from, uint _value, bytes _data) p... | tokenFallback | function tokenFallback(address _from, uint _value, bytes _data) public;
| /// @dev Standard ERC223 function that will handle incoming token transfers.
/// @param _from Token sender address.
/// @param _value Amount of tokens.
/// @param _data Transaction metadata. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
251,
327
]
} | 738 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | ERC223Basic | contract ERC223Basic is ERC20Basic {
/**
* @dev Transfer the specified amount of tokens to the specified address.
* Now with a new parameter _data.
*
* @param _to Receiver address.
* @param _value Amount of tokens that will be transferred.
* @param _data Transac... | transfer | function transfer(address _to, uint _value, bytes _data) public returns (bool);
| /**
* @dev Transfer the specified amount of tokens to the specified address.
* Now with a new parameter _data.
*
* @param _to Receiver address.
* @param _value Amount of tokens that will be transferred.
* @param _data Transaction metadata.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
346,
430
]
} | 739 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | ERC223BasicToken | contract ERC223BasicToken is ERC223Basic, BasicToken {
/**
* @dev Transfer the specified amount of tokens to the specified address.
* Invokes the `tokenFallback` function if the recipient is a contract.
* The token transfer fails if the recipient is a contract
* but doe... | transfer | function transfer(address _to, uint _value, bytes _data) public returns (bool) {
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
uint codeLength;
assembly {
// Retrieve the size of the code on target address, this n... | /**
* @dev Transfer the specified amount of tokens to the specified address.
* Invokes the `tokenFallback` function if the recipient is a contract.
* The token transfer fails if the recipient is a contract
* but does not implement the `tokenFallback` function
* or the fallback function to ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
594,
1321
]
} | 740 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | ERC223BasicToken | contract ERC223BasicToken is ERC223Basic, BasicToken {
/**
* @dev Transfer the specified amount of tokens to the specified address.
* Invokes the `tokenFallback` function if the recipient is a contract.
* The token transfer fails if the recipient is a contract
* but doe... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
bytes memory empty;
require(transfer(_to, _value, empty));
return true;
}
| /**
* @dev Transfer the specified amount of tokens to the specified address.
* Invokes the `tokenFallback` function if the recipient is a contract.
* The token transfer fails if the recipient is a contract
* but does not implement the `tokenFallback` function
* or the fallback function to ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1817,
1998
]
} | 741 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherToken | contract DetherToken is DetailedERC20, MintableToken, ERC223BasicToken {
string constant NAME = "Dether";
string constant SYMBOL = "DTH";
uint8 constant DECIMALS = 18;
/**
*@dev Constructor that set Detailed of the ERC20 token.
*/
function DetherToken()
DetailedERC20(NA... | DetherToken | function DetherToken()
DetailedERC20(NAME, SYMBOL, DECIMALS)
public
{}
| /**
*@dev Constructor that set Detailed of the ERC20 token.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
268,
366
]
} | 742 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | performInitialAllocations | function performInitialAllocations() external onlyOwner checkAllowed {
require(lockedTokensDistributed == false);
lockedTokensDistributed = true;
// Advisors
distributeTimelockedTokens(0x4dc976cEd66d1B87C099B338E1F1388AE657377d, MAX_DTH.mul(3).div(100), now + 6 * 4 weeks);
// Bounty
di... | /// @dev Distributes timed locked tokens | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1597,
3334
]
} | 743 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | registerPresaleContributor | function registerPresaleContributor(address userAddress, uint256 maxContribution)
external
onlyOwner
{
// Specified contribution has to be lower than the max
require(maxContribution <= WHITELISTING_MAX_CONTRIBUTION);
// Register user (Whitelistable contract)
registerUser(userAddress);
... | /// @dev Registers a user and sets the maximum contribution amount for the whitelisting period | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
3437,
3890
]
} | 744 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | allocateTokens | function allocateTokens(address contributor)
external
checkAllowed
{
require(presaleAllocated);
require(contributions[contributor] != 0);
// We keep a record of how much wei contributed has already been used for allocations
weiAllocated = weiAllocated.add(contributions[contributor]);
... | /// @dev Called to allocate the tokens depending on eth contributed.
/// @param contributor The address of the contributor. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
4027,
4966
]
} | 745 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | presaleAllocateTokens | function presaleAllocateTokens()
external
checkAllowed
{
require(!presaleAllocated);
presaleAllocated = true;
// Mint the respective tokens to the contributor
token.mint(presaleAddress, PRESALE_WEI.mul(DECIMALS_MULTIPLIER).div(weiPerDTH));
}
| /// @dev Called to allocate the tokens for presale address. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
5034,
5346
]
} | 746 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | getContributionLimit | function getContributionLimit(address userAddress) public view returns (uint256) {
uint256 saleStartTime = getStageStartTime(SALE_IN_PROGRESS);
// If not whitelisted or sale has not started, return 0
if (!whitelisted[userAddress] || block.timestamp < saleStartTime) {
return 0;
}
//... | /// @dev The limit will be different for every address during the whitelist period, and after that phase there is no limit for contributions. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
5674,
6403
]
} | 747 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | DetherSale | contract DetherSale is Sale, Whitelistable {
uint256 public constant PRESALE_WEI = 3956 ether * 1.15 + 490 ether; // Amount raised in the presale including bonus
uint256 public constant DECIMALS_MULTIPLIER = 1000000000000000000;
uint256 public constant MAX_DTH = 100000000 * DECIMALS_MULTIPLIER;
... | calculatePrice | function calculatePrice() public view returns(uint256) {
return weiContributed.add(PRESALE_WEI).div(60000000).add(1);
}
| /// @dev The price will be the total wei contributed divided by the amount of tokens to be allocated to contributors. | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
6950,
7088
]
} | 748 | |||
xBAKC | contracts/xMAYC.sol | 0xa3a7d67b14ccca2e94746c62728cd6c13f4601e3 | Solidity | xBAKC | contract xBAKC is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public PRICE;
uint256 public MAX_SUPPLY;
string private BASE_URI;
uint256 public FREE_MINT_LIMIT_PER_WALLET;
uint256 public MAX_MINT_AMOUNT_PER_TX;
bool public IS_SALE_ACTIVE;
uint256 public FREE_MI... | updateFreeMintCount | function updateFreeMintCount(address minter, uint256 count) private {
freeMintCountMap[minter] += count;
}
| /** FREE MINT **/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1015,
1137
]
} | 749 | ||||
xBAKC | contracts/xMAYC.sol | 0xa3a7d67b14ccca2e94746c62728cd6c13f4601e3 | Solidity | xBAKC | contract xBAKC is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public PRICE;
uint256 public MAX_SUPPLY;
string private BASE_URI;
uint256 public FREE_MINT_LIMIT_PER_WALLET;
uint256 public MAX_MINT_AMOUNT_PER_TX;
bool public IS_SALE_ACTIVE;
uint256 public FREE_MI... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return BASE_URI;
}
| /** GETTERS **/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1160,
1271
]
} | 750 | ||||
xBAKC | contracts/xMAYC.sol | 0xa3a7d67b14ccca2e94746c62728cd6c13f4601e3 | Solidity | xBAKC | contract xBAKC is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public PRICE;
uint256 public MAX_SUPPLY;
string private BASE_URI;
uint256 public FREE_MINT_LIMIT_PER_WALLET;
uint256 public MAX_MINT_AMOUNT_PER_TX;
bool public IS_SALE_ACTIVE;
uint256 public FREE_MI... | setPrice | function setPrice(uint256 customPrice) external onlyOwner {
PRICE = customPrice;
}
| /** SETTERS **/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1294,
1392
]
} | 751 | ||||
BancorBuyer | BancorBuyer.sol | 0x6bd33d49d48f76abcd96652e5347e398aa3fda96 | Solidity | BancorBuyer | contract BancorBuyer {
// Store the amount of ETH deposited or BNT owned by each account.
mapping (address => uint) public balances;
// Reward for first to execute the buy.
uint public reward;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record the time the... | withdraw | function withdraw(){
// Store the user's balance prior to withdrawal in a temporary variable.
uint amount = balances[msg.sender];
// Update the user's balance prior to sending ETH to prevent recursive call.
balances[msg.sender] = 0;
// Return the user's funds. Throws on failure to prevent loss of funds.... | // Withdraws all ETH deposited by the sender.
// Called to cancel a user's participation in the sale. | LineComment | v0.4.11+commit.68ef5810 | bzzr://bf0736ae213424e929ec58ad488fe91cd5227e281620a943c3792f37619e04a6 | {
"func_code_index": [
793,
1165
]
} | 752 | |||
BancorBuyer | BancorBuyer.sol | 0x6bd33d49d48f76abcd96652e5347e398aa3fda96 | Solidity | BancorBuyer | contract BancorBuyer {
// Store the amount of ETH deposited or BNT owned by each account.
mapping (address => uint) public balances;
// Reward for first to execute the buy.
uint public reward;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record the time the... | add_reward | function add_reward() payable {
// Update reward value to include received amount.
reward += msg.value;
}
| // Allow anyone to contribute to the buy executer's reward. | LineComment | v0.4.11+commit.68ef5810 | bzzr://bf0736ae213424e929ec58ad488fe91cd5227e281620a943c3792f37619e04a6 | {
"func_code_index": [
1233,
1354
]
} | 753 | |||
BancorBuyer | BancorBuyer.sol | 0x6bd33d49d48f76abcd96652e5347e398aa3fda96 | Solidity | BancorBuyer | contract BancorBuyer {
// Store the amount of ETH deposited or BNT owned by each account.
mapping (address => uint) public balances;
// Reward for first to execute the buy.
uint public reward;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record the time the... | buy | function buy(){
// Record that the contract has bought the tokens.
bought_tokens = true;
// Record the time the contract bought the tokens.
time_bought = now;
// Transfer all the funds (less the caller reward)
// to the Bancor crowdsale contract to buy tokens.
// Throws if the crowdsale hasn't sta... | // Buys tokens in the crowdsale and rewards the caller, callable by anyone. | LineComment | v0.4.11+commit.68ef5810 | bzzr://bf0736ae213424e929ec58ad488fe91cd5227e281620a943c3792f37619e04a6 | {
"func_code_index": [
1438,
2025
]
} | 754 | |||
BancorBuyer | BancorBuyer.sol | 0x6bd33d49d48f76abcd96652e5347e398aa3fda96 | Solidity | BancorBuyer | contract BancorBuyer {
// Store the amount of ETH deposited or BNT owned by each account.
mapping (address => uint) public balances;
// Reward for first to execute the buy.
uint public reward;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record the time the... | default_helper | function default_helper() payable {
// Only allow deposits if the contract hasn't already purchased the tokens.
if (!bought_tokens) {
// Update records of deposited ETH to include the received amount.
balances[msg.sender] += msg.value;
}
// Withdraw the sender's tokens if the contract has already ... | // A helper function for the default function, allowing contracts to interact. | LineComment | v0.4.11+commit.68ef5810 | bzzr://bf0736ae213424e929ec58ad488fe91cd5227e281620a943c3792f37619e04a6 | {
"func_code_index": [
2112,
3244
]
} | 755 | |||
CyberChainToken | CyberChainToken.sol | 0x17e16d30a05324b44cf78df847137fa1220448f8 | 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;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* Name : CyberChain (Cyber)
* Decimals : 8
* TotalSupply : 20000000000
*
*
*
*
*/ | 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.23+commit.124ca40d | bzzr://5364046cd91ba3b793b25467ac20d6b1bf74eb3996d00349f67055cd45eabbf9 | {
"func_code_index": [
95,
302
]
} | 756 | |
CyberChainToken | CyberChainToken.sol | 0x17e16d30a05324b44cf78df847137fa1220448f8 | 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;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* Name : CyberChain (Cyber)
* Decimals : 8
* TotalSupply : 20000000000
*
*
*
*
*/ | 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.23+commit.124ca40d | bzzr://5364046cd91ba3b793b25467ac20d6b1bf74eb3996d00349f67055cd45eabbf9 | {
"func_code_index": [
392,
692
]
} | 757 | |
CyberChainToken | CyberChainToken.sol | 0x17e16d30a05324b44cf78df847137fa1220448f8 | 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;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* Name : CyberChain (Cyber)
* Decimals : 8
* TotalSupply : 20000000000
*
*
*
*
*/ | 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.23+commit.124ca40d | bzzr://5364046cd91ba3b793b25467ac20d6b1bf74eb3996d00349f67055cd45eabbf9 | {
"func_code_index": [
812,
940
]
} | 758 | |
CyberChainToken | CyberChainToken.sol | 0x17e16d30a05324b44cf78df847137fa1220448f8 | 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;
}
/**
* ... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
* Name : CyberChain (Cyber)
* Decimals : 8
* TotalSupply : 20000000000
*
*
*
*
*/ | 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.23+commit.124ca40d | bzzr://5364046cd91ba3b793b25467ac20d6b1bf74eb3996d00349f67055cd45eabbf9 | {
"func_code_index": [
1010,
1156
]
} | 759 | |
Mooniswap_ZapIn_V2 | contracts/1inch/Mooniswap_ZapIn_V2.sol | 0x1d0cb9498c81b264322a7a3570c6602f1d38f343 | Solidity | Mooniswap_ZapIn_V2 | contract Mooniswap_ZapIn_V2 is ZapInBaseV3_1 {
using SafeERC20 for IERC20;
address private constant wethTokenAddress =
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
constructor(uint256 _goodwill, uint256 _affiliateSplit)
ZapBaseV2_1(_goodwill, _affiliateSplit)
{
// 0x exchange
... | ZapIn | function ZapIn(
address fromToken,
uint256 amountIn,
address toPool,
uint256 minPoolTokens,
address intermediateToken,
address swapTarget,
bytes calldata swapData,
address affiliate,
bool transferResidual
) external payable stopInEmergency returns (uint256 lpReceived) {
uint256 i... | /**
@notice Add liquidity to Mooniswap pools with ETH/ERC20 Tokens
@param fromToken The ERC20 token used (address(0x00) if ether)
@param amountIn The amount of fromToken to invest
@param minPoolTokens Minimum quantity of pool tokens to receive. Reverts otherwise
@param swapTarget Excecution target for the first sw... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | GNU GPLv2 | {
"func_code_index": [
1036,
2434
]
} | 760 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | function() public payable {
if (msg.value > 0)
emit Deposit(msg.sender, msg.value);
}
| /// @dev Fallback function allows to deposit ether. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
2228,
2345
]
} | 761 | ||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | addOwner | function addOwner(address owner)
public
onlyWallet
ownerDoesNotExist(owner)
notNull(owner)
validRequirement(owners.length + 1, required)
{
isOwner[owner] = true;
owners.push(owner);
emit OwnerAddition(owner);
}
| /// @dev Allows to add a new owner. Transaction has to be sent by wallet.
/// @param owner Address of new owner. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3079,
3376
]
} | 762 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | removeOwner | function removeOwner(address owner)
public
onlyWallet
ownerExists(owner)
{
isOwner[owner] = false;
for (uint i=0; i<owners.length - 1; i++) {
if (owners[i] == owner) {
owners[i] = owners[owners.length - 1];
break;
}
}
owners.length -= 1;
... | /// @dev Allows to remove an owner. Transaction has to be sent by wallet.
/// @param owner Address of owner. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3498,
3996
]
} | 763 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | replaceOwner | function replaceOwner(address owner, address newOwner)
public
onlyWallet
ownerExists(owner)
ownerDoesNotExist(newOwner)
{
for (uint i=0; i<owners.length; i++) {
if (owners[i] == owner) {
owners[i] = newOwner;
break;
}
}
isOwner[owner] = fal... | /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.
/// @param owner Address of owner to be replaced.
/// @param owner Address of new owner. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
4195,
4687
]
} | 764 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | changeRequirement | function changeRequirement(uint _required)
public
onlyWallet
validRequirement(owners.length, _required)
{
required = _required;
emit RequirementChange(_required);
}
| /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.
/// @param _required Number of required confirmations. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
4857,
5081
]
} | 765 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | submitTransaction | function submitTransaction(address destination, uint value, bytes data)
public
returns (uint transactionId)
{
transactionId = addTransaction(destination, value, data);
confirmTransaction(transactionId);
}
| /// @dev Allows an owner to submit and confirm a transaction.
/// @param destination Transaction target address.
/// @param value Transaction ether value.
/// @param data Transaction data payload.
/// @return Returns transaction ID. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
5342,
5597
]
} | 766 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | confirmTransaction | function confirmTransaction(uint transactionId)
public
ownerExists(msg.sender)
transactionExists(transactionId)
notConfirmed(transactionId, msg.sender)
{
confirmations[transactionId][msg.sender] = true;
emit Confirmation(msg.sender, transactionId);
executeTransaction(transactionId);
... | /// @dev Allows an owner to confirm a transaction.
/// @param transactionId Transaction ID. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
5702,
6065
]
} | 767 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | revokeConfirmation | function revokeConfirmation(uint transactionId)
public
ownerExists(msg.sender)
confirmed(transactionId, msg.sender)
notExecuted(transactionId)
{
confirmations[transactionId][msg.sender] = false;
emit Revocation(msg.sender, transactionId);
}
| /// @dev Allows an owner to revoke a confirmation for a transaction.
/// @param transactionId Transaction ID. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6188,
6497
]
} | 768 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | executeTransaction | function executeTransaction(uint transactionId)
public
notExecuted(transactionId)
{
if (isConfirmed(transactionId)) {
// Transaction tx = transactions[transactionId];
transactions[transactionId].executed = true;
// tx.executed = true;
if (transactions[transactionId].d... | /// @dev Allows anyone to execute a confirmed transaction.
/// @param transactionId Transaction ID. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6610,
7281
]
} | 769 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | isConfirmed | function isConfirmed(uint transactionId)
public
constant
returns (bool)
{
uint count = 0;
for (uint i = 0; i < owners.length; i++) {
if (confirmations[transactionId][owners[i]])
count += 1;
if (count == required)
return true;
}
}
| /// @dev Returns the confirmation status of a transaction.
/// @param transactionId Transaction ID.
/// @return Confirmation status. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
7432,
7790
]
} | 770 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | addTransaction | function addTransaction(address destination, uint value, bytes data)
internal
notNull(destination)
returns (uint transactionId)
{
transactionId = transactionCount;
transactions[transactionId] = Transaction({
destination: destination,
value: value,
data: data,
... | /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.
/// @param destination Transaction target address.
/// @param value Transaction ether value.
/// @param data Transaction data payload.
/// @return Returns transaction ID. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
8128,
8604
]
} | 771 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | getConfirmationCount | function getConfirmationCount(uint transactionId)
public
constant
returns (uint count)
{
for (uint i = 0; i < owners.length; i++) {
if (confirmations[transactionId][owners[i]])
count += 1;
}
}
| /// @dev Returns number of confirmations of a transaction.
/// @param transactionId Transaction ID.
/// @return Number of confirmations. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
8804,
9086
]
} | 772 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | getTransactionCount | function getTransactionCount(bool pending, bool executed)
public
constant
returns (uint count)
{
for (uint i = 0; i < transactionCount; i++) {
if (pending && !transactions[i].executed || executed && transactions[i].executed)
count += 1;
}
}
| /// @dev Returns total number of transactions after filers are applied.
/// @param pending Include pending transactions.
/// @param executed Include executed transactions.
/// @return Total number of transactions after filters are applied. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
9349,
9679
]
} | 773 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | getOwners | function getOwners()
public
constant
returns (address[])
{
return owners;
}
| /// @dev Returns list of owners.
/// @return List of owner addresses. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
9762,
9888
]
} | 774 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | getConfirmations | function getConfirmations(uint transactionId)
public
constant
returns (address[] _confirmations)
{
address[] memory confirmationsTemp = new address[](owners.length);
uint count = 0;
uint i;
for (i = 0; i < owners.length; i++) {
if (confirmations[transactionId][owners[i]]) {
... | /// @dev Returns array with owner addresses, which confirmed transaction.
/// @param transactionId Transaction ID.
/// @return Returns array of owner addresses. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
10067,
10697
]
} | 775 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiMultiSigWallet | contract NamiMultiSigWallet {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);
event Revocation(address indexed sender, uint indexed transactionId);
event Submission(uint indexed transactionId);
event Execution(uint indexed t... | /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. | NatSpecSingleLine | getTransactionIds | function getTransactionIds(uint from, uint to, bool pending, bool executed)
public
constant
returns (uint[] _transactionIds)
{
uint[] memory transactionIdsTemp = new uint[](transactionCount);
uint count = 0;
uint i;
for (i = 0; i < transactionCount; i++) {
if (pending && !tr... | /// @dev Returns list of transaction IDs in defined range.
/// @param from Index start position of transaction array.
/// @param to Index end position of transaction array.
/// @param pending Include pending transactions.
/// @param executed Include executed transactions.
/// @return Returns array of transaction IDs. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
11049,
11749
]
} | 776 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | ERC223ReceivingContract | contract ERC223ReceivingContract {
/**
* @dev Standard ERC223 function that will handle incoming token transfers.
*
* @param _from Token sender address.
* @param _value Amount of tokens.
* @param _data Transaction metadata.
*/
function tokenFallback(address _from, uint _value, bytes _data) public re... | /**
* @title Contract that will work with ERC223 tokens.
*/ | NatSpecMultiLine | tokenFallback | function tokenFallback(address _from, uint _value, bytes _data) public returns (bool success);
| /**
* @dev Standard ERC223 function that will handle incoming token transfers.
*
* @param _from Token sender address.
* @param _value Amount of tokens.
* @param _data Transaction metadata.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
243,
342
]
} | 777 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to])... | /**
* Internal transfer, only can be called by this contract
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
2653,
3500
]
} | 778 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | transferForTeam | function transferForTeam(address _to, uint256 _value) public
onlyEscrow
{
_transfer(msg.sender, _to, _value);
}
| // Transfer the balance from owner's account to another account
// only escrow can send token (to send token private sale) | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3636,
3780
]
} | 779 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | transfer | function transfer(address _to, uint256 _value) public
onlyTranferable
{
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3990,
4132
]
} | 780 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | transferFrom | function transferFrom(address _from, address _to, uint256 _value)
public
onlyTranferable
returns (bool success)
{
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
4414,
4764
]
} | 781 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | approve | function approve(address _spender, uint256 _value) public
onlyTranferable
returns (bool success)
{
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
5028,
5235
]
} | 782 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
onlyTranferable
returns (bool success)
{
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
retu... | /**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to s... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
5629,
6012
]
} | 783 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | changeTransferable | function changeTransferable () public
onlyEscrow
{
TRANSFERABLE = !TRANSFERABLE;
}
| // allows transfer token | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6045,
6160
]
} | 784 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | changeEscrow | function changeEscrow(address _escrow) public
onlyNamiMultisig
{
require(_escrow != 0x0);
escrow = _escrow;
}
| // change escrow | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6189,
6340
]
} | 785 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | changeBinary | function changeBinary(uint _binary)
public
onlyEscrow
{
binary = _binary;
}
| // change binary value | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6375,
6492
]
} | 786 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | changeBinaryAddress | function changeBinaryAddress(address _binaryAddress)
public
onlyEscrow
{
require(_binaryAddress != 0x0);
binaryAddress = _binaryAddress;
}
| // change binary address | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
6529,
6718
]
} | 787 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | getPrice | function getPrice() public view returns (uint price) {
if (now < 1517443200) {
// presale
return 3450;
} else if (1517443200 < now && now <= 1518048000) {
// 1st week
return 2400;
} else if (1518048000 < now && now <= 1518652800) {
// 2nd week
return ... | /*
* price in ICO:
* first week: 1 ETH = 2400 NAC
* second week: 1 ETH = 23000 NAC
* 3rd week: 1 ETH = 2200 NAC
* 4th week: 1 ETH = 2100 NAC
* 5th week: 1 ETH = 2000 NAC
* 6th week: 1 ETH = 1900 NAC
* 7th week: 1 ETH = 1800 NAC
* 8th week: 1 ETH = 1700 nac
* time:
* 1517443200: Thursday, February... | Comment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
7566,
8668
]
} | 788 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | burnTokens | function burnTokens(address _owner) public
onlyCrowdsaleManager
{
// Available only during migration phase
require(currentPhase == Phase.Migrating);
uint tokens = balanceOf[_owner];
require(tokens != 0);
balanceOf[_owner] = 0;
totalSupply -= tokens;
emit LogBurn(_owner, tokens... | /// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
9566,
10197
]
} | 789 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | setPresalePhase | function setPresalePhase(Phase _nextPhase) public
onlyEscrow
{
bool canSwitchPhase
= (currentPhase == Phase.Created && _nextPhase == Phase.Running)
|| (currentPhase == Phase.Running && _nextPhase == Phase.Paused)
// switch to migration phase only if crowdsale manager is set
... | /*/
* Administrative functions
/*/ | Comment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
10254,
11164
]
} | 790 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | _migrateToken | function _migrateToken(address _from, address _to)
internal
{
PresaleToken presale = PresaleToken(namiPresale);
uint256 newToken = presale.balanceOf(_from);
require(newToken > 0);
// burn old token
presale.burnTokens(_from);
// add new token to _to
balanceOf[_to] = balanceOf[_to... | // internal migrate migration tokens | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
12025,
12591
]
} | 791 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | migrateToken | function migrateToken(address _from, address _to) public
onlyEscrow
{
_migrateToken(_from, _to);
}
| // migate token function for Nami Team | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
12638,
12769
]
} | 792 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | migrateForInvestor | function migrateForInvestor() public {
_migrateToken(msg.sender, msg.sender);
}
| // migrate token for investor | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
12807,
12905
]
} | 793 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | transferToExchange | function transferToExchange(address _to, uint _value, uint _price) public {
uint codeLength;
assembly {
codeLength := extcodesize(_to)
}
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(msg.se... | /**
* @dev Transfer the specified amount of tokens to the NamiExchange address.
* Invokes the `tokenFallbackExchange` function.
* The token transfer fails if the recipient is a contract
* but does not implement the `tokenFallbackExchange` function
* or the fallback function to receive fund... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
13720,
14361
]
} | 794 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiCrowdSale | contract NamiCrowdSale {
using SafeMath for uint256;
/// NAC Broker Presale Token
/// @dev Constructor
constructor(address _escrow, address _namiMultiSigWallet, address _namiPresale) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _na... | transferToBuyer | function transferToBuyer(address _to, uint _value, address _buyer) public {
uint codeLength;
assembly {
codeLength := extcodesize(_to)
}
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(msg.se... | /**
* @dev Transfer the specified amount of tokens to the NamiExchange address.
* Invokes the `tokenFallbackBuyer` function.
* The token transfer fails if the recipient is a contract
* but does not implement the `tokenFallbackBuyer` function
* or the fallback function to receive funds.
*... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
14880,
15515
]
} | 795 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | DSMath | contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x);
}
function mul(uint x, uint y) internal pure returns (uint z) {
requir... | rpow | function rpow(uint x, uint n) internal pure returns (uint z) {
z = n % 2 != 0 ? x : RAY;
for (n /= 2; n != 0; n /= 2) {
x = rmul(x, x);
if (n % 2 != 0) {
z = rmul(z, x);
}
}
}
| // This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x *... | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
1905,
2177
]
} | 796 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | DSToken | contract DSToken is DSTokenBase(10000000000000000000000000), DSStop {
bytes32 public symbol;
uint256 public decimals = 18; // standard token precision. override to customize
function DSToken(bytes32 symbol_) public {
symbol = symbol_;
}
event Mint(address indexed guy, uint wa... | /* import "./base.sol"; */ | Comment | DSToken | function DSToken(bytes32 symbol_) public {
symbol = symbol_;
}
| // standard token precision. override to customize | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
193,
274
]
} | 797 | |
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | changeEscrow | function changeEscrow(address _escrow) public
onlyNamiMultisig
{
require(_escrow != 0x0);
escrow = _escrow;
}
| // change escrow | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
1384,
1531
]
} | 798 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | changeMinWithdraw | function changeMinWithdraw(uint _minWithdraw) public
onlyEscrow
{
require(_minWithdraw != 0);
minWithdraw = _minWithdraw;
}
| // min and max for withdraw nac | LineComment | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
1571,
1732
]
} | 799 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | withdrawEther | function withdrawEther(uint _amount, address _to) public
onlyEscrow
{
require(namiMultiSigWallet != address(0x0));
// Available at any phase.
if (address(this).balance > 0) {
_to.transfer(_amount);
}
}
| /// @dev withdraw ether to nami multisignature wallet, only escrow can call
/// @param _amount value ether in wei to withdraw | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
2020,
2290
]
} | 800 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | withdrawNac | function withdrawNac(uint _amount) public
onlyEscrow
{
require(namiMultiSigWallet != address(0x0));
// Available at any phase.
NamiCrowdSale namiToken = NamiCrowdSale(NamiAddr);
if (namiToken.balanceOf(address(this)) > 0) {
namiToken.transfer(namiMultiSigWallet, _amount);
}
}
| /// @dev withdraw NAC to nami multisignature wallet, only escrow can call
/// @param _amount value NAC to withdraw | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
2420,
2774
]
} | 801 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | withdrawDai | function withdrawDai(uint _amount) public
onlyEscrow
{
require(namiMultiSigWallet != address(0x0));
// Available at any phase.
DSToken DAIToken = DSToken(DaiAddress);
if (DAIToken.balanceOf(address(this)) > 0) {
DAIToken.transfer(namiMultiSigWallet, _amount);
}
}
| /// @dev withdraw DAI to nami multisignature wallet, only escrow can call
/// @param _amount value NAC to withdraw | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
2902,
3243
]
} | 802 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | setController | function setController(address _controller)
public
onlyEscrow
{
require(!isController[_controller]);
isController[_controller] = true;
}
| /**
* make new controller
* require input address is not a controller
* execute any time in sc state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3410,
3589
]
} | 803 | |||
NamiTradeDai | NamiTradeDai.sol | 0x6b49586597da3742f4224a13495ca91add35639e | Solidity | NamiTradeDai | contract NamiTradeDai{
using SafeMath for uint256;
constructor(address _escrow, address _namiMultiSigWallet, address _namiAddress, address _daiAddress) public {
require(_namiMultiSigWallet != 0x0);
escrow = _escrow;
namiMultiSigWallet = _namiMultiSigWallet;
NamiAddr = _na... | removeController | function removeController(address _controller)
public
onlyEscrow
{
require(isController[_controller]);
isController[_controller] = false;
}
| /**
* remove controller
* require input address is a controller
* execute any time in sc state
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0536bde712de9405b6b4b27444ebc916aa467e1026d1d052a48431289f7d69f1 | {
"func_code_index": [
3719,
3901
]
} | 804 | |||
MetaFunRunNFT | contracts/MetaFunRunNFT.sol | 0xf21991430c5593e1af819d583c87e39850b7d82a | Solidity | MetaFunRunNFT | contract MetaFunRunNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
bool public _isSaleActive = false;
bool public _revealed = false;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public mintPrice = 0.077 ether;
uint256 public maxBalance = 1;
... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // internal | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://3309964e0a7465d1bba3b4aa9a58c67089c2799ba947a178c3aa765c35afbbab | {
"func_code_index": [
2708,
2821
]
} | 805 | ||
MetaFunRunNFT | contracts/MetaFunRunNFT.sol | 0xf21991430c5593e1af819d583c87e39850b7d82a | Solidity | MetaFunRunNFT | contract MetaFunRunNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
bool public _isSaleActive = false;
bool public _revealed = false;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public mintPrice = 0.077 ether;
uint256 public maxBalance = 1;
... | flipSaleActive | function flipSaleActive() public onlyOwner {
_isSaleActive = !_isSaleActive;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://3309964e0a7465d1bba3b4aa9a58c67089c2799ba947a178c3aa765c35afbbab | {
"func_code_index": [
2842,
2939
]
} | 806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.