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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
InariV1 | @boringcrypto/boring-solidity/contracts/BoringBatchable.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | InariV1 | contract InariV1 is BoringBatchableWithDai, SushiZap {
using SafeMath for uint256;
using BoringERC20 for IERC20;
IERC20 constant sushiToken = IERC20(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract
address constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // x... | /// @notice Contract that batches SUSHI staking and DeFi strategies - V1 'iroirona'. | NatSpecSingleLine | /// @notice Fallback for received ETH - SushiSwap ETH to stake SUSHI into xSUSHI and BENTO for benefit of `to`. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
23208,
23997
]
} | 11,800 | ||
InariV1 | @boringcrypto/boring-solidity/contracts/BoringBatchable.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | InariV1 | contract InariV1 is BoringBatchableWithDai, SushiZap {
using SafeMath for uint256;
using BoringERC20 for IERC20;
IERC20 constant sushiToken = IERC20(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract
address constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // x... | /// @notice Contract that batches SUSHI staking and DeFi strategies - V1 'iroirona'. | NatSpecSingleLine | inariZushi | function inariZushi(address to) external payable returns (uint256 amountOut, uint256 shareOut) {
(uint256 reserve0, uint256 reserve1, ) = sushiSwapSushiETHPair.getReserves();
uint256 amountInWithFee = msg.value.mul(997);
uint256 out =
amountInWithFee.mul(reserve0) /
reserve1.mul(1000).a... | /// @notice SushiSwap ETH to stake SUSHI into xSUSHI and BENTO for benefit of `to`. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
24094,
24953
]
} | 11,801 |
InariV1 | @boringcrypto/boring-solidity/contracts/BoringBatchable.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | InariV1 | contract InariV1 is BoringBatchableWithDai, SushiZap {
using SafeMath for uint256;
using BoringERC20 for IERC20;
IERC20 constant sushiToken = IERC20(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract
address constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // x... | /// @notice Contract that batches SUSHI staking and DeFi strategies - V1 'iroirona'. | NatSpecSingleLine | swap | function swap(address fromToken, address toToken, address to, uint256 amountIn) external returns (uint256 amountOut) {
(address token0, address token1) = fromToken < toToken ? (fromToken, toToken) : (toToken, fromToken);
ISushiSwap pair =
ISushiSwap(
uint256(
keccak256(a... | /// @notice Simple SushiSwap `fromToken` `amountIn` to `toToken` for benefit of `to`. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
25051,
26167
]
} | 11,802 |
InariV1 | @boringcrypto/boring-solidity/contracts/BoringBatchable.sol | 0x195e8262aa81ba560478ec6ca4da73745547073f | Solidity | InariV1 | contract InariV1 is BoringBatchableWithDai, SushiZap {
using SafeMath for uint256;
using BoringERC20 for IERC20;
IERC20 constant sushiToken = IERC20(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract
address constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // x... | /// @notice Contract that batches SUSHI staking and DeFi strategies - V1 'iroirona'. | NatSpecSingleLine | swapBalance | function swapBalance(address fromToken, address toToken, address to) external returns (uint256 amountOut) {
(address token0, address token1) = fromToken < toToken ? (fromToken, toToken) : (toToken, fromToken);
ISushiSwap pair =
ISushiSwap(
uint256(
keccak256(abi.encodePa... | /// @notice Simple SushiSwap local `fromToken` balance in this contract to `toToken` for benefit of `to`. | NatSpecSingleLine | v0.7.6+commit.7338295f | GNU GPLv2 | ipfs://89a5125d850fb87a89b52e2cb580c7d062e507e61b962188e0983cbea998b8cd | {
"func_code_index": [
26281,
27437
]
} | 11,803 |
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | startPublicSale | function startPublicSale(uint256 _saleDuration, uint256 _saleStartPrice, uint256 _saleEndPrice)
external
onlyOwner
beforePublicSaleStarted
{
require(_saleStartPrice > _saleEndPrice, "_saleStartPrice must be greater than _saleEndPrice");
require(addressReferencesSet, "External reference contracts must all be s... | /**
@notice startPublicSale is called to start the dutch auction for minting Gods to the public.
@param _saleDuration The duration of the sale, in seconds, before reaching the minimum minting
price.
@param _saleStartPrice The initial minting price, which progressively lowers as the dutch
auction progresses.
@para... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
5081,
5721
]
} | 11,804 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | setAddressReferences | function setAddressReferences(
address _idolMainAddress,
address _idolMarketplaceAddress,
address _virtueTokenAddress
)
external
onlyOwner
beforePublicSaleStarted
{
addressReferencesSet = true;
idolMain = IIdolMain(_idolMainAddress);
require(steth.approve(_idolMainAddress, 2**255-1));
idolMarketpl... | /**
@notice setAddressReferences sets references to the main, marketplace, and virtueToken addresses
so that the contracts all know about each other. This is all done from the mint contract so
that the addresses will no longer be updateable once the mint event has started.
@param _idolMainAddress The address of Ido... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
6220,
6796
]
} | 11,805 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | pausePublicSale | function pausePublicSale()
external
onlyOwner
whenPublicSaleActive
{
uint256 currentSalePrice = getMintPrice();
uint256 elapsedTime = getElapsedSaleTime();
publicSalePausedElapsedTime = elapsedTime;
publicSalePaused = true;
emit PublicSalePaused(currentSalePrice, elapsedTime);
}
| /**
@notice pausePublicSale is called to pause the progression of the mint event. In happy-path
circumstances we shouldn't need to call this, but it is included as a precaution in case
something goes wrong during the mint.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7044,
7363
]
} | 11,806 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | getElapsedSaleTime | function getElapsedSaleTime() internal view returns (uint256) {
if (publicSalePaused) {
return publicSalePausedElapsedTime;
}
return publicSaleStartTime > 0 ? block.timestamp - publicSaleStartTime : 0;
}
| /**
@notice getElaspedSaleTime is a view function that tells us how many seconds have elapsed since
the public sale was started.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
7801,
8026
]
} | 11,807 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | getRemainingSaleTime | function getRemainingSaleTime() external view returns (uint256) {
if (publicSaleStartTime == 0) {
// If the public sale has not been started, we just return 1 week as a placeholder.
return 604800;
}
if (publicSalePaused) {
return publicSaleDuration - publicSalePausedElapsedTime;
}
if (getElapsed... | /**
@notice getRemainingSaleTime is a view function that tells us how many seconds are remaining
before the dutch auction hits the minimum price.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
8191,
8664
]
} | 11,808 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | getMintPrice | function getMintPrice() public view returns (uint256) {
if (!publicSaleStarted) {
return 0;
}
uint256 elapsed = getElapsedSaleTime();
if (elapsed >= publicSaleDuration) {
return publicSaleGodEndingPrice;
} else {
int256 tempPrice = int256(publicSaleGodStartingPrice) +
((int256(publicSaleGodE... | /**
@notice getMintPrice returns the price to mint a God at the current time in the dutch auction.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
8776,
9425
]
} | 11,809 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | mintGods | function mintGods(uint256 _numGodsToMint)
external
payable
whenPublicSaleActive
nonReentrant
{
require(
publicGodsMinted + _numGodsToMint <= MAX_GODS_TO_MINT - NUM_RESERVED_NFTS,
"Minting would exceed max supply"
);
require(_numGodsToMint > 0, "Must mint at least one god");
require(
idolMain... | /**
@notice mintGods is a payable function which allows the sender to pay ETH to mint God NFTs
at the current price specified by getMintPrice.
@param _numGodsToMint The number of gods to be minted, which is capped at a maximum of 5 Gods
per transaction.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
9708,
10833
]
} | 11,810 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | mintReservedGods | function mintReservedGods(uint256 _numGodsToMint, address _mintAddress, bool _lock)
external
onlyOwner
nonReentrant
{
require(
reservedGodsMinted + _numGodsToMint < NUM_RESERVED_NFTS,
"Minting would exceed max reserved supply"
);
require(_numGodsToMint > 0, "Must mint at least one god");
for (uin... | /**
@notice mintReservedGods is used by the contract owner to mint a reserved pool of 1000 Gods
for owners and supporters of the protocol.
@param _numGodsToMint The number of Gods to mint in this transaction.
@param _mintAddress The address to mint the reserved Gods for.
@param _lock If true, specifies that the mi... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
11282,
11886
]
} | 11,811 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | sendToOfferingRefundContract | function sendToOfferingRefundContract(uint _totalRefundAmount) onlyOwner external nonReentrant {
Address.sendValue(payable(address(offeringRefundContract)), _totalRefundAmount);
}
| /**
@notice sendToOfferingRefundContract sends ETH to the OfferingRefundContract so that it can be
distributed to the addresses that are eligible for a refund.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
12065,
12252
]
} | 11,812 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | swap | function swap(uint _slippageBps)
onlyOwner
external
returns(uint result)
{
return stethPool.exchange{ value: address(this).balance }(0, 1, address(this).balance, address(this).balance * _slippageBps / 10000);
}
| /**
@notice swap is used to swap the contract's ETH into stETH via Curve.
@param _slippageBps The acceptable slippage percent, in basis points.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
12414,
12646
]
} | 11,813 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | depositStethIdolMain | function depositStethIdolMain()
onlyOwner
external
{
idolMain.depositSteth(steth.balanceOf(address(this)));
}
| /**
@notice depositStethIdolMain deposits all of this contract's stETH into the IdolMain contract.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
13137,
13264
]
} | 11,814 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | getTotalMinted | function getTotalMinted() external view returns (uint) {
return reservedGodsMinted + publicGodsMinted;
}
| /**
@notice getTotalMinted returns the total number of public + reserved God NFTs minted.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
13367,
13479
]
} | 11,815 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | setBaseURI | function setBaseURI(string memory uri) external onlyOwner {
idolMain.setBaseURI(uri);
}
| /**
@notice setBaseURI sets the baseURI for the God NFTs.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
13550,
13645
]
} | 11,816 | ||
IdolMintContract | contracts/IdolMintContract.sol | 0x7b4b02372d8e54c1c0454d97f01d85ef203cdc5e | Solidity | IdolMintContract | contract IdolMintContract is Ownable, ReentrancyGuard {
// publicGodsMinted tracks the number of Gods that have been minted by the public through the
// mintGods function.
uint public publicGodsMinted;
// reservedGodsMinted tracks the number of reserved Gods that have been minted through the
// mintReservedG... | /**
@notice IdolMintContract is a contract used for the initial mint of the God NFTs. It allocates 90%
of the Gods for public minting through a dutch auction protocol, and reserves 10% of the Gods
for the creators of the protocol as well as other supporters and stakeholders. IdolMintContract
is intended to be torn ... | NatSpecMultiLine | tearDown | function tearDown() external onlyOwner {
selfdestruct(payable(owner()));
}
| /**
@notice Tears down the contract and allocates any remaining funds to the original
contract owner. Should only be called after the mint completes and the contract's balance
has been converted to Steth and deposited into IdolMain, or in a disaster scenario
where we need to tear down the contract and refund mintin... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | {
"func_code_index": [
14000,
14082
]
} | 11,817 | ||
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
635,
816
]
} | 11,818 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
199,
287
]
} | 11,819 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
445,
777
]
} | 11,820 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
983,
1087
]
} | 11,821 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
401,
858
]
} | 11,822 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
1490,
1685
]
} | 11,823 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
2009,
2140
]
} | 11,824 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
2606,
2875
]
} | 11,825 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approva... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
3346,
3761
]
} | 11,826 | |
BITRNXFFF | BITRNXFFF.sol | 0x20e830d29b184c08a8facc73d4603e8a0d3a2bfa | Solidity | BITRNXFFF | contract BITRNXFFF is StandardToken, Ownable {
string public constant name = "BITRNXFFF";
string public constant symbol = "BIT-FFF";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 200000000 * (10 ** uint256(decimals));
//prevent duplicate distributions
mappi... | /**
* @title Eternal Token
* @dev DistributableToken contract is based on a simple initial supply token, with an API for the owner to perform bulk distributions.
* transactions to the distributeTokens function should be paginated to avoid gas limits or computational time restrictions.
*/ | NatSpecMultiLine | anailNathrachOrthaBhaisIsBeathaDoChealDeanaimh | function anailNathrachOrthaBhaisIsBeathaDoChealDeanaimh(address[] addresses, uint256[] values) onlyOwner public returns (bool success) {
require(addresses.length == values.length);
for (uint i = 0; i < addresses.length; i++) {
require(!distributionLocks[addresses[i]]);
transfer(addresses[i],... | /**
* @dev Distribute tokens to multiple addresses in a single transaction
*
* @param addresses A list of addresses to distribute to
* @param values A corresponding list of amounts to distribute to each address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://0ca4c6357aeba1a021af42dbb7644db29538cf828d8d66cc17f2b68929b3e009 | {
"func_code_index": [
829,
1275
]
} | 11,827 | |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
299,
395
]
} | 11,828 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
453,
568
]
} | 11,829 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| //转账 | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
583,
746
]
} | 11,830 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
804,
943
]
} | 11,831 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
1085,
1242
]
} | 11,832 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amou... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
1709,
2018
]
} | 11,833 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
2422,
2637
]
} | 11,834 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
3135,
3401
]
} | 11,835 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exc... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
3886,
4362
]
} | 11,836 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| // | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
4646,
4959
]
} | 11,837 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amo... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
5286,
5639
]
} | 11,838 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
6074,
6417
]
} | 11,839 |
AIB2020 | ERC20.sol | 0x4b63ce7e179d1db5ddac5d9d54e48356cf3e8b7d | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSup... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20Mintable}.
*
* TIP: For a detailed writeup see our guide
*... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
}
| /**
* @dev Destroys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See {_burn} and {_approve}.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MIT | bzzr://0d1d7faa6754d74b7a40e0489566283646cecb89c0c24a0a887d31b108d4a230 | {
"func_code_index": [
6598,
6835
]
} | 11,840 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | approveWeaver | function approveWeaver(address _weaver) public onlyGov {
approvedWeavers[_weaver] = true;
}
| // **** Protected functions **** | LineComment | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
1511,
1618
]
} | 11,841 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | recoverERC20 | function recoverERC20(address _token) public onlyGov {
IERC20(_token).safeTransfer(governance, IERC20(_token).balanceOf(address(this)));
}
| // Emergency | LineComment | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
1845,
1999
]
} | 11,842 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | deposit | function deposit(address _token, uint256 _amount) public nonReentrant {
IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
deposits[_token][msg.sender][curId[_token]] = deposits[_token][msg.sender][curId[_token]].add(_amount);
totalDeposited[_token][curId[_token]] = totalDeposited[_token]... | /// @notice Deposits ERC20 to be later converted into the Basket by some kind soul | NatSpecSingleLine | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
3206,
3577
]
} | 11,843 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | withdraw | function withdraw(address _token, uint256 _amount) public nonReentrant {
// Reverts if withdrawing too many
deposits[_token][msg.sender][curId[_token]] = deposits[_token][msg.sender][curId[_token]].sub(_amount);
totalDeposited[_token][curId[_token]] = totalDeposited[_token][curId[_token]].sub(_amount);
... | /// @notice User doesn't want to wait anymore and just wants their ERC20 back | NatSpecSingleLine | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
3661,
4057
]
} | 11,844 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | withdrawBMI | function withdrawBMI(address _token, uint256 _id) public nonReentrant {
require(_id < curId[_token], "!weaved");
require(!claimed[_token][msg.sender][_id], "already-claimed");
uint256 userDeposited = deposits[_token][msg.sender][_id];
require(userDeposited > 0, "!deposit");
uint256 ratio = userDepo... | /// @notice User withdraws converted Basket token | NatSpecSingleLine | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
4113,
4712
]
} | 11,845 |
SocialBMIZapper | SocialBMIZapper.sol | 0xd2a1c50601df0e0a37f2f915608098022d12eb92 | Solidity | SocialBMIZapper | contract SocialBMIZapper is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance;
address public bmi;
address public bmiZapper;
// **** ERC20 **** //
// Token => Id
mapping(address => uint256) public curId;
// Token => User Address =... | // Basket Weaver is a way to socialize gas costs related to minting baskets tokens | LineComment | withdrawBMIMany | function withdrawBMIMany(address[] memory _tokens, uint256[] memory _ids) public {
assert(_tokens.length == _ids.length);
for (uint256 i = 0; i < _tokens.length; i++) {
withdrawBMI(_tokens[i], _ids[i]);
}
}
| /// @notice User withdraws converted Basket token | NatSpecSingleLine | v0.7.3+commit.9bfce1f6 | MIT | ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8 | {
"func_code_index": [
4768,
5019
]
} | 11,846 |
MFactory | MMath.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MMath | contract MMath is MBronze, MConst, MNum {
/**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice ... | calcSpotPrice | function calcSpotPrice(
uint tokenBalanceIn,
uint tokenWeightIn,
uint tokenBalanceOut,
uint tokenWeightOut,
uint swapFee
)
internal pure
returns (uint spotPrice)
{
uint numer = bdiv(tokenBalanceIn, tokenWeightIn);
uint denom = bdiv(tokenBalanceOut, tokenWeightOut);
uint ratio = bdiv(nume... | /**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice //
// bI = tokenBalanceIn ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
942,
1434
]
} | 11,847 | ||
MFactory | MMath.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MMath | contract MMath is MBronze, MConst, MNum {
/**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice ... | calcOutGivenIn | function calcOutGivenIn(
uint tokenBalanceIn,
uint tokenWeightIn,
uint tokenBalanceOut,
uint tokenWeightOut,
uint tokenAmountIn,
uint swapFee
)
public pure
returns (uint tokenAmountOut)
{
uint weightRatio = bdiv(tokenWeightIn, tokenWeightOut);
uint adjustedIn = bsub(BONE, swapFee);
a... | /**********************************************************************************************
// calcOutGivenIn //
// aO = tokenAmountOut //
// bO = tokenBalanceOut ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
2436,
3096
]
} | 11,848 | ||
MFactory | MMath.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MMath | contract MMath is MBronze, MConst, MNum {
/**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice ... | calcInGivenOut | function calcInGivenOut(
uint tokenBalanceIn,
uint tokenWeightIn,
uint tokenBalanceOut,
uint tokenWeightOut,
uint tokenAmountOut,
uint swapFee
)
public pure
returns (uint tokenAmountIn)
{
uint weightRatio = bdiv(tokenWeightOut, tokenWeightIn);
uint diff = bsub(tokenBalanceOut, tokenAmoun... | /**********************************************************************************************
// calcInGivenOut //
// aI = tokenAmountIn //
// bO = tokenBalanceOut ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
4098,
4747
]
} | 11,849 | ||
MFactory | MMath.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MMath | contract MMath is MBronze, MConst, MNum {
/**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice ... | calcPoolOutGivenSingleIn | function calcPoolOutGivenSingleIn(
uint tokenBalanceIn,
uint tokenWeightIn,
uint poolSupply,
uint totalWeight,
uint tokenAmountIn,
uint swapFee
)
internal pure
returns (uint poolAmountOut)
{
// Charge the trading fee for the proportion of tokenAi
/// which is implicitly traded to the ot... | /**********************************************************************************************
// calcPoolOutGivenSingleIn //
// pAo = poolAmountOut / \ //
// tAi = tokenAmountIn ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
5749,
6886
]
} | 11,850 | ||
MFactory | MMath.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MMath | contract MMath is MBronze, MConst, MNum {
/**********************************************************************************************
// calcSpotPrice //
// sP = spotPrice ... | calcSingleOutGivenPoolIn | function calcSingleOutGivenPoolIn(
uint tokenBalanceOut,
uint tokenWeightOut,
uint poolSupply,
uint totalWeight,
uint poolAmountIn,
uint swapFee
)
internal pure
returns (uint tokenAmountOut)
{
uint normalizedWeight = bdiv(tokenWeightOut, totalWeight);
// charge exit fee on the pool token... | /**********************************************************************************************
// calcSingleOutGivenPoolIn //
// tAo = tokenAmountOut / / \\ //
// bO = tokenBalanceOut ... | NatSpecMultiLine | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
7988,
9197
]
} | 11,851 | ||
KyberConverter | contracts/dex/ITokenConverter.sol | 0xb26177640eb73b0ac8d6b7f298e40764eff52bdc | Solidity | ITokenConverter | contract ITokenConverter {
using SafeMath for uint256;
/**
* @dev Makes a simple ERC20 -> ERC20 token trade
* @param _srcToken - IERC20 token
* @param _destToken - IERC20 token
* @param _srcAmount - uint256 amount to be converted
* @param _destAmount - uint256 amount to get aft... | convert | function convert(
IERC20 _srcToken,
IERC20 _destToken,
uint256 _srcAmount,
uint256 _destAmount
) external returns (uint256);
| /**
* @dev Makes a simple ERC20 -> ERC20 token trade
* @param _srcToken - IERC20 token
* @param _destToken - IERC20 token
* @param _srcAmount - uint256 amount to be converted
* @param _destAmount - uint256 amount to get after conversion
* @return uint256 for the change. 0 if there is no change
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69ba92e98511c1a8edf6aec2c862f0f4b932d5e4e43562938959c8cfa2c9f86a | {
"func_code_index": [
406,
580
]
} | 11,852 | |||
KyberConverter | contracts/dex/ITokenConverter.sol | 0xb26177640eb73b0ac8d6b7f298e40764eff52bdc | Solidity | ITokenConverter | contract ITokenConverter {
using SafeMath for uint256;
/**
* @dev Makes a simple ERC20 -> ERC20 token trade
* @param _srcToken - IERC20 token
* @param _destToken - IERC20 token
* @param _srcAmount - uint256 amount to be converted
* @param _destAmount - uint256 amount to get aft... | getExpectedRate | function getExpectedRate(IERC20 _srcToken, IERC20 _destToken, uint256 _srcAmount)
public view returns(uint256 expectedRate, uint256 slippageRate);
| /**
* @dev Get exchange rate and slippage rate.
* Note that these returned values are in 18 decimals regardless of the destination token's decimals.
* @param _srcToken - IERC20 token
* @param _destToken - IERC20 token
* @param _srcAmount - uint256 amount to be converted
* @return uint256 of the expected r... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://69ba92e98511c1a8edf6aec2c862f0f4b932d5e4e43562938959c8cfa2c9f86a | {
"func_code_index": [
982,
1143
]
} | 11,853 | |||
MFactory | MNum.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MNum | contract MNum is MConst {
function btoi(uint a)
internal pure
returns (uint)
{
return a / BONE;
}
function bfloor(uint a)
internal pure
returns (uint)
{
return btoi(a) * BONE;
}
function badd(uint a, uint b)
internal pure
returns (uint)
{
... | bpowi | function bpowi(uint a, uint n)
internal pure
returns (uint)
{
uint z = n % 2 != 0 ? a : BONE;
for (n /= 2; n != 0; n /= 2) {
a = bmul(a, a);
if (n % 2 != 0) {
z = bmul(z, a);
}
}
return z;
}
| // DSMath.wpow | LineComment | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
1505,
1801
]
} | 11,854 | ||
MFactory | MNum.sol | 0x41c3cec9ae12a29d258cf904dda65f08ff742718 | Solidity | MNum | contract MNum is MConst {
function btoi(uint a)
internal pure
returns (uint)
{
return a / BONE;
}
function bfloor(uint a)
internal pure
returns (uint)
{
return btoi(a) * BONE;
}
function badd(uint a, uint b)
internal pure
returns (uint)
{
... | bpow | function bpow(uint base, uint exp)
internal pure
returns (uint)
{
require(base >= MIN_BPOW_BASE, "ERR_BPOW_BASE_TOO_LOW");
require(base <= MAX_BPOW_BASE, "ERR_BPOW_BASE_TOO_HIGH");
uint whole = bfloor(exp);
uint remain = bsub(exp, whole);
uint wholePow = bpowi(base, btoi(whole));
if (remain ... | // Compute b^(e.w) by splitting it into (b^e)*(b^0.w).
// Use `bpowi` for `b^e` and `bpowK` for k iterations
// of approximation of b^0.w | LineComment | v0.5.12+commit.7709ece9 | Unlicense | bzzr://2a277232a61e32885976daf44d130a763efd4c67a6d4b0254dc6f0647de2e950 | {
"func_code_index": [
1953,
2483
]
} | 11,855 | ||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
261,
321
]
} | 11,856 | |
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
644,
820
]
} | 11,857 | |
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | precrowdsale | function precrowdsale ( address tokenholder ) onlyFront payable {
require ( presold < presoldMax );
uint award; // amount of dragons to credit to tokenholder
uint donation; // donation to charity
require ( alreadyParticipated[ tokenholder ] != true ) ;
alreadyParticipate... | // runs during precrowdsale - can only be called by main crowdsale contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
1365,
2742
]
} | 11,858 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | crowdsale | function crowdsale ( address tokenholder ) onlyFront payable {
uint award; // amount of dragons to send to tokenholder
uint donation; // donation to charity
DragonPricing pricingstructure = new DragonPricing();
( award , donation ) = pricingstructure.crowdsalepricing( tokenhold... | // runs when crowdsale is active - can only be called by main crowdsale contract | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
2835,
3807
]
} | 11,859 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | advisorSiphon | function advisorSiphon() internal {
uint share = msg.value/10;
uint foradvisor = share;
if ( (advisorCut + share) > advisorTotal ) foradvisor = advisorTotal.sub( advisorCut );
advisor.transfer ( foradvisor ); // advisor gets 10% of the incoming ether... | // pays the advisor part of the incoming ether | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
3872,
4630
]
} | 11,860 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | transferBeneficiary | function transferBeneficiary ( address _newbeneficiary ) onlyOwner {
require ( _newbeneficiary != 0x00 );
beneficiary = _newbeneficiary;
}
| // use this to set the crowdsale beneficiary address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
4708,
4894
]
} | 11,861 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | transferCharity | function transferCharity ( address _charity ) onlyOwner {
require ( _charity != 0x00 );
charity = _charity;
}
| // use this to set the charity address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
4945,
5102
]
} | 11,862 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | setFront | function setFront ( address _front ) onlyOwner {
require ( _front != 0x00 );
front = _front;
}
| // sets crowdsale address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
5140,
5282
]
} | 11,863 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | setAdvisor | function setAdvisor ( address _advisor ) onlyOwner {
require ( _advisor != 0x00 );
require ( advisorset == false );
advisorset = true;
advisor = _advisor;
}
| // sets advisors address | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
5313,
5535
]
} | 11,864 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | withdrawCrowdsaleDragons | function withdrawCrowdsaleDragons() onlyOwner{
uint256 balance = tokenReward.balanceOf( address( this ) );
tokenReward.transfer( beneficiary, balance );
}
| //empty the crowdsale contract of Dragons and forward balance to beneficiary | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
5639,
5851
]
} | 11,865 | |||
DragonCrowdsaleCore | DragonCrowdsaleCore.sol | 0xd275b50f71badf4fa2f911e80e1e420730ab403e | Solidity | DragonCrowdsaleCore | contract DragonCrowdsaleCore is Ownable, DragonPricing {
using SafeMath for uint;
// address public owner;
address public beneficiary;
address public charity;
address public advisor;
address public front;
bool public advisorset;
uint public tokensSold;
uint ... | manualSend | function manualSend ( address tokenholder, uint packagenumber ) onlyOwner {
require ( tokenholder != 0x00 );
if ( packagenumber != 1 && packagenumber != 2 && packagenumber != 3 ) revert();
uint award;
uint donation;
if ( packagenumber == 1 ) { award ... | //manually send different dragon packages | LineComment | v0.4.18+commit.9cf6e910 | bzzr://29509a214ff9474aa8c7265bfcb60b8c49cd1f1b36989de6157cc035ebf8e0ee | {
"func_code_index": [
5905,
6963
]
} | 11,866 | |||
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
251,
437
]
} | 11,867 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
707,
848
]
} | 11,868 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
1138,
1335
]
} | 11,869 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
1581,
2057
]
} | 11,870 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
2520,
2657
]
} | 11,871 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
3140,
3423
]
} | 11,872 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
3875,
4010
]
} | 11,873 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
4482,
4653
]
} | 11,874 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | ECDSA | library ECDSA {
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the ... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | recover | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
// Check the signature length
if (signature.length != 65) {
revert("ECDSA: invalid signature length");
}
// Divide the signature in r, s and v variables
bytes32 r;
bytes32 s;
uint8 v;
... | /**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half ord... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
811,
2923
]
} | 11,875 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | ECDSA | library ECDSA {
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the ... | /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/ | NatSpecMultiLine | toEthSignedMessageHash | function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
| /**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* replicates the behavior of the
* https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
* JSON-RPC method.
*
* See {recover}.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
3192,
3466
]
} | 11,876 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
94,
154
]
} | 11,877 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
237,
310
]
} | 11,878 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
534,
616
]
} | 11,879 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
895,
983
]
} | 11,880 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
1647,
1726
]
} | 11,881 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
2039,
2141
]
} | 11,882 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | Fabric | library Fabric {
/*Vault bytecode
def _fallback() payable:
call cd[56] with:
funct call.data[0 len 4]
gas cd[56] wei
args call.data[4 len 64]
selfdestruct(tx.origin)
// Constructor bytecode
0x6012600081600A8... | /**
* @title Fabric
* @dev Create deterministics vaults.
*/ | NatSpecMultiLine | getVault | function getVault(bytes32 _key) internal view returns (address) {
return address(
uint256(
keccak256(
abi.encodePacked(
byte(0xff),
address(this),
_key,
vaultCodeHash
)
... | /**
* @dev Get a deterministics vault.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
2422,
2829
]
} | 11,883 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | Fabric | library Fabric {
/*Vault bytecode
def _fallback() payable:
call cd[56] with:
funct call.data[0 len 4]
gas cd[56] wei
args call.data[4 len 64]
selfdestruct(tx.origin)
// Constructor bytecode
0x6012600081600A8... | /**
* @title Fabric
* @dev Create deterministics vaults.
*/ | NatSpecMultiLine | executeVault | function executeVault(bytes32 _key, IERC20 _token, address _to) internal returns (uint256 value) {
address addr;
bytes memory slotcode = code;
/* solium-disable-next-line */
assembly{
// Create the contract arguments for the constructor
addr := create2(0, add(slotcode, 0x20), mload(s... | /**
* @dev Create deterministic vault.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
2889,
3698
]
} | 11,884 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IModule | interface IModule {
/// @notice receive ETH
receive() external payable;
/**
* @notice Executes an order
* @param _inputToken - Address of the input token
* @param _inputAmount - uint256 of the input token amount (order amount)
* @param _owner - Address of the order's owner
... | /// @notice receive ETH | NatSpecSingleLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
50,
82
]
} | 11,885 | ||||
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IModule | interface IModule {
/// @notice receive ETH
receive() external payable;
/**
* @notice Executes an order
* @param _inputToken - Address of the input token
* @param _inputAmount - uint256 of the input token amount (order amount)
* @param _owner - Address of the order's owner
... | execute | function execute(
IERC20 _inputToken,
uint256 _inputAmount,
address payable _owner,
bytes calldata _data,
bytes calldata _auxData
) external returns (uint256 bought);
| /**
* @notice Executes an order
* @param _inputToken - Address of the input token
* @param _inputAmount - uint256 of the input token amount (order amount)
* @param _owner - Address of the order's owner
* @param _data - Bytes of the order's data
* @param _auxData - Bytes of the auxiliar data used for the han... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
525,
746
]
} | 11,886 | ||
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | IModule | interface IModule {
/// @notice receive ETH
receive() external payable;
/**
* @notice Executes an order
* @param _inputToken - Address of the input token
* @param _inputAmount - uint256 of the input token amount (order amount)
* @param _owner - Address of the order's owner
... | canExecute | function canExecute(
IERC20 _inputToken,
uint256 _inputAmount,
bytes calldata _data,
bytes calldata _auxData
) external view returns (bool);
| /**
* @notice Check whether an order can be executed or not
* @param _inputToken - Address of the input token
* @param _inputAmount - uint256 of the input token amount (order amount)
* @param _data - Bytes of the order's data
* @param _auxData - Bytes of the auxiliar data used for the handlers to execute the ... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
1173,
1359
]
} | 11,887 | ||
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | /**
* @dev Prevent users to send Ether directly to this contract
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
861,
1023
]
} | 11,888 | ||
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | depositEth | function depositEth(
bytes calldata _data
) external payable {
require(msg.value > 0, "HyperLimit#depositEth: VALUE_IS_0");
(
address module,
address inputToken,
address payable owner,
address witness,
bytes memory data,
) = decodeOrder(_data);
... | /**
* @notice Create an ETH to token order
* @param _data - Bytes of an ETH to token order. See `encodeEthOrder` for more info
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
1179,
1934
]
} | 11,889 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | cancelOrder | function cancelOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes calldata _data
) external {
require(msg.sender == _owner, "HyperLimit#cancelOrder: INVALID_OWNER");
bytes32 key = keyOf(
_module,
_inputToken,
_owner,... | /**
* @notice Cancel order
* @dev The params should be the same used for the order creation
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _witness - Address of the witness
* ... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
2340,
3021
]
} | 11,890 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | encodeTokenOrder | function encodeTokenOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes calldata _data,
bytes32 _secret,
uint256 _amount
) external view returns (bytes memory) {
return abi.encodeWithSelector(
_inputToken.transfer.selector,
... | /**
* @notice Get the calldata needed to create a token to token/ETH order
* @dev Returns the input data that the user needs to use to create the order
* The _secret is used to prevent a front-running at the order execution
* The _amount is used as the param `_value` for the ERC20 `transfer` function
* @param... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
3814,
4584
]
} | 11,891 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | encodeEthOrder | function encodeEthOrder(
address _module,
address _inputToken,
address payable _owner,
address _witness,
bytes calldata _data,
bytes32 _secret
) external pure returns (bytes memory) {
return abi.encode(
_module,
_inputToken,
_owner,
_witness,
... | /**
* @notice Get the calldata needed to create a ETH to token order
* @dev Returns the input data that the user needs to use to create the order
* The _secret is used to prevent a front-running at the order execution
* @param _module - Address of the module to use for the order execution
* @param _inputToken... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
5235,
5662
]
} | 11,892 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | decodeOrder | function decodeOrder(
bytes memory _data
) public pure returns (
address module,
address inputToken,
address payable owner,
address witness,
bytes memory data,
bytes32 secret
) {
(
module,
inputToken,
owner,
witness,
data,
s... | /**
* @notice Get order's properties
* @param _data - Bytes of the order
* @return module - Address of the module to use for the order execution
* @return inputToken - Address of the input token
* @return owner - Address of the order's owner
* @return witness - Address of the witness
* @return data - Byte... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
6103,
6744
]
} | 11,893 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | vaultOfOrder | function vaultOfOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes memory _data
) public view returns (address) {
return keyOf(
_module,
_inputToken,
_owner,
_witness,
_data
).getVault();
}
| /**
* @notice Get the vault's address of a token to token/ETH order
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _witness - Address of the witness
* @param _data - Bytes of th... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
7171,
7544
]
} | 11,894 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | executeOrder | function executeOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
bytes calldata _data,
bytes calldata _signature,
bytes calldata _auxData
) external {
// Calculate witness using signature
address witness = ECDSA.recover(
keccak256(abi.encodePacked(msg... | /**
* @notice Executes an order
* @dev The sender should use the _secret to sign its own address
* to prevent front-runnings
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _da... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
8100,
9234
]
} | 11,895 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | existOrder | function existOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes calldata _data
) external view returns (bool) {
bytes32 key = keyOf(
_module,
_inputToken,
_owner,
_witness,
_data
);
if (addre... | /**
* @notice Check whether an order exists or not
* @dev Check the balance of the order
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _witness - Address of the witness
* @pa... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
9693,
10250
]
} | 11,896 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | canExecuteOrder | function canExecuteOrder(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes calldata _data,
bytes calldata _auxData
) external view returns (bool) {
bytes32 key = keyOf(
_module,
_inputToken,
_owner,
_witness,
... | /**
* @notice Check whether an order can be executed or not
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _witness - Address of the witness
* @param _data - Bytes of the order'... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
10778,
11557
]
} | 11,897 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | _pullOrder | function _pullOrder(
IERC20 _inputToken,
bytes32 _key,
address payable _to
) private returns (uint256 amount) {
if (address(_inputToken) == ETH_ADDRESS) {
amount = ethDeposits[_key];
ethDeposits[_key] = 0;
(bool success,) = _to.call{value: amount}("");
require(su... | /**
* @notice Transfer the order amount to a recipient.
* @dev For an ETH order, the ETH will be transferred from this contract
* For a token order, its vault will be executed transferring the amount of tokens to
* the recipient
* @param _inputToken - Address of the input token
* @param _key - Order's key
... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
12007,
12514
]
} | 11,898 |
HyperLimit | HyperLimit.sol | 0x16a893f27fdb30cc05d8fd7a333a5ab841461658 | Solidity | HyperLimit | contract HyperLimit is Order {
using SafeMath for uint256;
using Fabric for bytes32;
// ETH orders
mapping(bytes32 => uint256) public ethDeposits;
// Events
event DepositETH(
bytes32 indexed _key,
address indexed _caller,
uint256 _amount,
bytes _data... | /// @notice Core contract used to create, cancel and execute orders. | NatSpecSingleLine | keyOf | function keyOf(
IModule _module,
IERC20 _inputToken,
address payable _owner,
address _witness,
bytes memory _data
) public pure returns (bytes32) {
return keccak256(
abi.encode(
_module,
_inputToken,
_owner,
_witness,
... | /**
* @notice Get the order's key
* @param _module - Address of the module to use for the order execution
* @param _inputToken - Address of the input token
* @param _owner - Address of the order's owner
* @param _witness - Address of the witness
* @param _data - Bytes of the order's data
* @return bytes32... | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | MIT | ipfs://87b25594a09c529edcbca78f8b34edb2270eef34e0e1c6085d9645d3ea74cd05 | {
"func_code_index": [
12894,
13313
]
} | 11,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.