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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | Mintable | contract Mintable is Context {
/**
* @dev So here we seperate the rights of the classic ownership into 'owner' and 'minter'
* this way the developer/owner stays the 'owner' and can make changes like adding a pool
* at any time but cannot mint anymore as soon as the 'minter' gets changes (to the... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an minter) that can be granted exclusive access to
* specific functions.
*
* By default, the minter account will be the one that deploys the contract. This
* can later be changed with {transferMintership... | NatSpecMultiLine | transferMintership | function transferMintership(address newMinter) public virtual onlyMinter {
require(newMinter != address(0), "Mintable: new minter is the zero address");
emit MintershipTransferred(_minter, newMinter);
_minter = newMinter;
}
| /**
* @dev Transfers mintership of the contract to a new account (`newMinter`).
* Can only be called by the current minter.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
1276,
1536
]
} | 28,200 |
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
847,
935
]
} | 28,201 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
1224,
1316
]
} | 28,202 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | decimals | function decimals() public view returns (uint256) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
1949,
2039
]
} | 28,203 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
2099,
2204
]
} | 28,204 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | burnedSupply | function burnedSupply() public view returns (uint256) {
return _burnedSupply;
}
| /**
* @dev Returns the amount of burned tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
2275,
2373
]
} | 28,205 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | burnRate | function burnRate() public view returns (uint256) {
return _burnRate;
}
| /**
* @dev Returns the burnrate.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
2429,
2519
]
} | 28,206 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
2577,
2701
]
} | 28,207 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
2909,
3089
]
} | 28,208 | ||
Token | Token.sol | 0xe15c466b2bb7499d539604a11240d1f407417888 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 private _burnedSupply;
uint256 pr... | burn | function burn(uint256 amount) public virtual returns (bool) {
_burn(_msgSender(), amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5606763ddaee3eb698ab169eb9bcfd70d17b5084337847c2393af531c5f14576 | {
"func_code_index": [
3295,
3428
]
} | 28,209 | ||
yVault_ZapOut_V3 | contracts/yEarn/yVault_ZapOut_V3.sol | 0xa8a3b1a1e09a0f84b2856533db4ee0cc88dd4e11 | Solidity | IYVault | interface IYVault {
function deposit(uint256) external;
function withdraw(uint256) external;
function getPricePerFullShare() external view returns (uint256);
function token() external view returns (address);
function decimals() external view returns (uint256);
// V2
function pricePerSha... | pricePerShare | function pricePerShare() external view returns (uint256);
| // V2 | LineComment | v0.8.4+commit.c7e474f2 | GNU GPLv2 | {
"func_code_index": [
296,
357
]
} | 28,210 | |||
yVault_ZapOut_V3 | contracts/yEarn/yVault_ZapOut_V3.sol | 0xa8a3b1a1e09a0f84b2856533db4ee0cc88dd4e11 | Solidity | yVault_ZapOut_V3 | contract yVault_ZapOut_V3 is ZapOutBaseV3 {
using SafeERC20 for IERC20;
IAaveLendingPoolAddressesProvider
private constant lendingPoolAddressProvider =
IAaveLendingPoolAddressesProvider(
0x24a42fD28C976A61Df5D00D0599C34c4f90748c8
);
IYVaultV1Registry V1Registry =
... | ZapOutWithPermit | function ZapOutWithPermit(
address fromVault,
uint256 amountIn,
address toToken,
bool isAaveUnderlying,
uint256 minToTokens,
bytes calldata permitSig,
address swapTarget,
bytes calldata swapData,
address affiliate,
bool shouldSellEntireBalance
) external returns (uint256 tokensRe... | /**
@notice Zap out in to a single token with permit
@param fromVault Vault from which to remove liquidity
@param amountIn Quantity of vault tokens to remove
@param toToken Address of desired token
@param isAaveUnderlying True if vault contains aave token
@param minToTokens Minimum quantity of tokens to receive, ... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | GNU GPLv2 | {
"func_code_index": [
1869,
2632
]
} | 28,211 | |||
yVault_ZapOut_V3 | contracts/yEarn/yVault_ZapOut_V3.sol | 0xa8a3b1a1e09a0f84b2856533db4ee0cc88dd4e11 | Solidity | yVault_ZapOut_V3 | contract yVault_ZapOut_V3 is ZapOutBaseV3 {
using SafeERC20 for IERC20;
IAaveLendingPoolAddressesProvider
private constant lendingPoolAddressProvider =
IAaveLendingPoolAddressesProvider(
0x24a42fD28C976A61Df5D00D0599C34c4f90748c8
);
IYVaultV1Registry V1Registry =
... | ZapOut | function ZapOut(
address fromVault,
uint256 amountIn,
address toToken,
bool isAaveUnderlying,
uint256 minToTokens,
address swapTarget,
bytes memory swapData,
address affiliate,
bool shouldSellEntireBalance
) public stopInEmergency returns (uint256 tokensReceived) {
_pullTokens(fr... | /**
@notice Zap out in to a single token with permit
@param fromVault Vault from which to remove liquidity
@param amountIn Quantity of vault tokens to remove
@param toToken Address of desired token
@param isAaveUnderlying True if vault contains aave token
@param minToTokens Minimum quantity of tokens to receive, ... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | GNU GPLv2 | {
"func_code_index": [
3728,
5746
]
} | 28,212 | |||
yVault_ZapOut_V3 | contracts/yEarn/yVault_ZapOut_V3.sol | 0xa8a3b1a1e09a0f84b2856533db4ee0cc88dd4e11 | Solidity | yVault_ZapOut_V3 | contract yVault_ZapOut_V3 is ZapOutBaseV3 {
using SafeERC20 for IERC20;
IAaveLendingPoolAddressesProvider
private constant lendingPoolAddressProvider =
IAaveLendingPoolAddressesProvider(
0x24a42fD28C976A61Df5D00D0599C34c4f90748c8
);
IYVaultV1Registry V1Registry =
... | removeLiquidityReturn | function removeLiquidityReturn(address fromVault, uint256 liquidity)
external
view
returns (uint256)
{
IYVault vault = IYVault(fromVault);
address[] memory V1Vaults = V1Registry.getVaults();
for (uint256 i = 0; i < V1Registry.getVaultsLength(); i++) {
if (V1Vaults[i] == fromVault)
... | /**
@notice Utility function to determine the quantity of underlying tokens removed from vault
@param fromVault Yearn vault from which to remove liquidity
@param liquidity Quantity of vault tokens to remove
@return Quantity of underlying LP or token removed
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | GNU GPLv2 | {
"func_code_index": [
7534,
8060
]
} | 28,213 | |||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | _addLiquidity | function _addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin
) internal virtual returns (uint amountA, uint amountB) {
// create the pair if it doesn't exist yet
if (ISwapFactory(factory).getPair(tokenA, tokenB) == add... | // **** ADD LIQUIDITY **** | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
573,
1931
]
} | 28,214 | ||||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | removeLiquidity | function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
address pair = SwapLibrary.pairFor(factory, tokenA, tokenB);
ISwapPa... | // **** REMOVE LIQUIDITY **** | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
3631,
4480
]
} | 28,215 | ||||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | removeLiquidityETHSupportingFeeOnTransferTokens | function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) public virtual override ensure(deadline) returns (uint amountETH) {
(, amountETH) = removeLiquidity(
token,
WETH,
... | // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
6519,
7203
]
} | 28,216 | ||||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | _swap | function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
for (uint i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = SwapLibrary.sortTokens(input, output);
uint amountOut = amounts[i + 1];
... | // **** SWAP ****
// requires the initial amount to have already been sent to the first pair | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
8004,
8712
]
} | 28,217 | ||||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | _swapSupportingFeeOnTransferTokens | function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
for (uint i; i < path.length - 1; i++) {
(address input, address output) = (path[i], path[i + 1]);
(address token0,) = SwapLibrary.sortTokens(input, output);
ISwapPair pair = ISwapPair(SwapLibr... | // **** SWAP (supporting fee-on-transfer tokens) ****
// requires the initial amount to have already been sent to the first pair | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
13232,
14403
]
} | 28,218 | ||||
SwapRouter | contracts/swap/SwapRouter.sol | 0x8cda39226daf33ae1aba0c92c34d1a1982cf0210 | Solidity | SwapRouter | contract SwapRouter is ISwapRouter {
using SafeMath for uint;
address public immutable override factory;
address public immutable override WETH;
modifier ensure(uint deadline) {
require(deadline >= block.timestamp, 'convergenceX swapRouter: EXPIRED');
_;
}
constructor(address ... | quote | function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
return SwapLibrary.quote(amountA, reserveA, reserveB);
}
| // **** LIBRARY FUNCTIONS **** | LineComment | v0.6.12+commit.27d51765 | {
"func_code_index": [
16828,
17013
]
} | 28,219 | ||||
StrategyBalancerMTA | StrategyBalancerMTA.sol | 0x45f6e8aabe595ac6e7586c0872a4b5eb4663ce52 | Solidity | StrategyBalancerMTA | contract StrategyBalancerMTA {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address constant public mUSD = address(0xe2f2a5C287993345a840Db3B0845fbC70f5935a5);
ad... | /*
Strategy ~ 50% USDC to mUSD
mUSD+USDC into balancer
BAL+MTA
*/ | Comment | withdraw | function withdraw(IERC20 _asset) external returns (uint balance) {
require(msg.sender == controller, "!controller");
require(address(_asset) != want, "!c");
require(address(_asset) != mUSD, "!c");
require(address(_asset) != balancer, "!c");
balance = _asset.balanceOf(address(this));
_asset... | // Controller only function for creating additional rewards from dust | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://78369117c5a2834f4ec5e40892e963241e2f68bb3426c934a98f69734864932c | {
"func_code_index": [
1636,
2027
]
} | 28,220 |
StrategyBalancerMTA | StrategyBalancerMTA.sol | 0x45f6e8aabe595ac6e7586c0872a4b5eb4663ce52 | Solidity | StrategyBalancerMTA | contract StrategyBalancerMTA {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address constant public mUSD = address(0xe2f2a5C287993345a840Db3B0845fbC70f5935a5);
ad... | /*
Strategy ~ 50% USDC to mUSD
mUSD+USDC into balancer
BAL+MTA
*/ | Comment | withdraw | function withdraw(uint _amount) external {
require(msg.sender == controller, "!controller");
uint _balance = IERC20(want).balanceOf(address(this));
if (_balance < _amount) {
_withdrawSome(_amount.sub(_balance));
}
IERC20(want).safeTransfer(msg.sender, _amount);
/*
a... | // Withdraw partial funds, normally used with a vault withdrawal | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://78369117c5a2834f4ec5e40892e963241e2f68bb3426c934a98f69734864932c | {
"func_code_index": [
2104,
2687
]
} | 28,221 |
StrategyBalancerMTA | StrategyBalancerMTA.sol | 0x45f6e8aabe595ac6e7586c0872a4b5eb4663ce52 | Solidity | StrategyBalancerMTA | contract StrategyBalancerMTA {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
address constant public want = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address constant public mUSD = address(0xe2f2a5C287993345a840Db3B0845fbC70f5935a5);
ad... | /*
Strategy ~ 50% USDC to mUSD
mUSD+USDC into balancer
BAL+MTA
*/ | Comment | withdrawAll | function withdrawAll() external returns (uint balance) {
require(msg.sender == controller, "!controller");
_withdrawAll();
balance = IERC20(want).balanceOf(address(this));
IERC20(want).safeTransfer(msg.sender, balance);
/*
address _vault = Controller(controller).vaults(... | // Withdraw all funds, normally used when migrating strategies | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://78369117c5a2834f4ec5e40892e963241e2f68bb3426c934a98f69734864932c | {
"func_code_index": [
2762,
3291
]
} | 28,222 |
MyMileage | MyMileage.sol | 0x185bd0d0e13686c616983ac543590efa40f88c64 | Solidity | MyMileage | contract MyMileage {
// Владелец контракта.
address private owner;
// Отображение хеш сумм фотографий и дат.
mapping(bytes32 => uint) private map;
// Модификатор доступа "только владелец".
modifier onlyOwner {
require(msg.sender == owner);
_;
}
// Констр... | // Констракт. | LineComment | put | function put(bytes32 imageHash) onlyOwner public {
// Проверка пустого значения по ключу.
require(free(imageHash));
// Установка значения.
map[imageHash] = now;
}
| // Добавление записи. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://78110cc5f1d4f48b430feb942e9eac9a95aa46eeac4d3b3b88ca61cf9b54dbf4 | {
"func_code_index": [
421,
633
]
} | 28,223 | |
MyMileage | MyMileage.sol | 0x185bd0d0e13686c616983ac543590efa40f88c64 | Solidity | MyMileage | contract MyMileage {
// Владелец контракта.
address private owner;
// Отображение хеш сумм фотографий и дат.
mapping(bytes32 => uint) private map;
// Модификатор доступа "только владелец".
modifier onlyOwner {
require(msg.sender == owner);
_;
}
// Констр... | // Констракт. | LineComment | free | function free(bytes32 imageHash) view public returns (bool) {
return map[imageHash] == 0;
}
| // Проверка наличия значения. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://78110cc5f1d4f48b430feb942e9eac9a95aa46eeac4d3b3b88ca61cf9b54dbf4 | {
"func_code_index": [
671,
781
]
} | 28,224 | |
MyMileage | MyMileage.sol | 0x185bd0d0e13686c616983ac543590efa40f88c64 | Solidity | MyMileage | contract MyMileage {
// Владелец контракта.
address private owner;
// Отображение хеш сумм фотографий и дат.
mapping(bytes32 => uint) private map;
// Модификатор доступа "только владелец".
modifier onlyOwner {
require(msg.sender == owner);
_;
}
// Констр... | // Констракт. | LineComment | get | function get(bytes32 imageHash) view public returns (uint) {
return map[imageHash];
}
| // Получение значения. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://78110cc5f1d4f48b430feb942e9eac9a95aa46eeac4d3b3b88ca61cf9b54dbf4 | {
"func_code_index": [
812,
916
]
} | 28,225 | |
MyMileage | MyMileage.sol | 0x185bd0d0e13686c616983ac543590efa40f88c64 | Solidity | MyMileage | contract MyMileage {
// Владелец контракта.
address private owner;
// Отображение хеш сумм фотографий и дат.
mapping(bytes32 => uint) private map;
// Модификатор доступа "только владелец".
modifier onlyOwner {
require(msg.sender == owner);
_;
}
// Констр... | // Констракт. | LineComment | getConfirmationCode | function getConfirmationCode() view public returns (bytes32) {
return blockhash(block.number - 6);
}
| // Получение кода подтверждения
// в виде хеша блока. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://78110cc5f1d4f48b430feb942e9eac9a95aa46eeac4d3b3b88ca61cf9b54dbf4 | {
"func_code_index": [
988,
1107
]
} | 28,226 | |
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
815,
932
]
} | 28,227 | |
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
1097,
1205
]
} | 28,228 | |
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
1343,
1521
]
} | 28,229 | |
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | createAssetPack | function createAssetPack(
bytes32 _packCover,
uint[] _attributes,
bytes32[] _ipfsHashes,
uint _packPrice,
string _ipfsHash) public {
require(_ipfsHashes.length > 0);
require(_ipfsHashes.length < 50);
require(_attributes.length == _ipfsHashes.length);
uint[] me... | /// @notice Function to create assetpack
/// @param _packCover is cover image for asset pack
/// @param _attributes is array of attributes
/// @param _ipfsHashes is array containing all ipfsHashes for assets we'd like to put in pack
/// @param _packPrice is price for total assetPack (every asset will have average price... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
1965,
2914
]
} | 28,230 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | createAsset | function createAsset(uint _attributes, bytes32 _ipfsHash, uint _packId) internal returns(uint) {
uint id = numberOfAssets;
require(isAttributesValid(_attributes), "Attributes are not valid.");
assets.push(Asset({
id : id,
packId: _packId,
attributes: _attributes,
i... | /// @notice Function which creates an asset
/// @param _attributes is meta info for asset
/// @param _ipfsHash is ipfsHash to image of asset | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
3073,
3517
]
} | 28,231 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | buyAssetPack | function buyAssetPack(address _to, uint _assetPackId) public payable {
require(!checkHasPermissionForPack(_to, _assetPackId));
AssetPack memory assetPack = assetPacks[_assetPackId];
require(msg.value >= assetPack.price);
// if someone wants to pay more money for asset pack, we will give all of it ... | /// @notice Method to buy right to use specific asset pack
/// @param _to is address of user who will get right on that asset pack
/// @param _assetPackId is id of asset pack user is buying | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
3725,
4357
]
} | 28,232 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | changeAssetPackPrice | function changeAssetPackPrice(uint _assetPackId, uint _newPrice) public {
require(assetPacks[_assetPackId].creator == msg.sender);
assetPacks[_assetPackId].price = _newPrice;
}
| /// @notice Change price of asset pack
/// @param _assetPackId is id of asset pack for changing price
/// @param _newPrice is new price for that asset pack | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
4531,
4737
]
} | 28,233 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | approveTakeover | function approveTakeover(uint _assetPackId, address _newCreator) public {
require(assetPacks[_assetPackId].creator == msg.sender);
approvedTakeover[_assetPackId] = _newCreator;
}
| /// @notice Approve address to become creator of that pack
/// @param _assetPackId id of asset pack for other address to claim
/// @param _newCreator address that will be able to claim that asset pack | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
4956,
5164
]
} | 28,234 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | claimAssetPack | function claimAssetPack(uint _assetPackId) public {
require(approvedTakeover[_assetPackId] == msg.sender);
approvedTakeover[_assetPackId] = address(0);
assetPacks[_assetPackId].creator = msg.sender;
}
| /// @notice claim asset pack that is previously approved by creator
/// @param _assetPackId id of asset pack that is changing creator | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
5311,
5558
]
} | 28,235 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | withdraw | function withdraw() public {
uint amount = artistBalance[msg.sender];
artistBalance[msg.sender] = 0;
msg.sender.transfer(amount);
}
| ///@notice Function where all artists can withdraw their funds | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
5629,
5799
]
} | 28,236 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getNumberOfAssets | function getNumberOfAssets() public view returns (uint) {
return numberOfAssets;
}
| /// @notice Function to fetch total number of assets
/// @return numberOfAssets | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
5892,
5993
]
} | 28,237 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getNumberOfAssetPacks | function getNumberOfAssetPacks() public view returns(uint) {
return numberOfAssetPacks;
}
| /// @notice Function to fetch total number of assetpacks
/// @return uint numberOfAssetPacks | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
6099,
6207
]
} | 28,238 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | checkHasPermissionForPack | function checkHasPermissionForPack(address _address, uint _packId) public view returns (bool) {
return (assetPacks[_packId].creator == _address) || hasPermission[_address][_packId];
}
| /// @notice Function to check if user have permission (owner / bought) for pack
/// @param _address is address of user
/// @param _packId is id of pack | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
6377,
6581
]
} | 28,239 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | checkHashExists | function checkHashExists(bytes32 _ipfsHash) public view returns (bool) {
return hashExists[_ipfsHash];
}
| /// @notice Function to check does hash exist in mapping
/// @param _ipfsHash is bytes32 representation of hash | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
6706,
6829
]
} | 28,240 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | pickUniquePacks | function pickUniquePacks(uint[] assetIds) public view returns (uint[]) {
require(assetIds.length > 0);
uint[] memory packs = new uint[](assetIds.length);
uint packsCount = 0;
for (uint i = 0; i < assetIds.length; i++) {
Asset memory asset = assets[assetIds[i]];
bool exi... | /// @notice method that gets all unique packs from array of assets | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
6904,
7770
]
} | 28,241 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAssetInfo | function getAssetInfo(uint id) public view returns (uint, uint, uint, bytes32) {
require(id >= 0);
require(id < numberOfAssets);
Asset memory asset = assets[id];
return (asset.id, asset.packId, asset.attributes, asset.ipfsHash);
}
| /// @notice Method to get all info for an asset
/// @param id is id of asset
/// @return All data for an asset | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
7899,
8177
]
} | 28,242 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAssetPacksUserCreated | function getAssetPacksUserCreated(address _address) public view returns(uint[]) {
return createdAssetPacks[_address];
}
| /// @notice method returns all asset packs created by _address
/// @param _address is creator address | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
8292,
8430
]
} | 28,243 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAssetIpfs | function getAssetIpfs(uint _id) public view returns (bytes32) {
require(_id < numberOfAssets);
return assets[_id].ipfsHash;
}
| /// @notice Function to get ipfsHash for selected asset
/// @param _id is id of asset we'd like to get ipfs hash
/// @return string representation of ipfs hash of that asset | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
8622,
8785
]
} | 28,244 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAssetAttributes | function getAssetAttributes(uint _id) public view returns (uint) {
require(_id < numberOfAssets);
return assets[_id].attributes;
}
| /// @notice Function to get attributes for selected asset
/// @param _id is id of asset we'd like to get ipfs hash
/// @return uint representation of attributes of that asset | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
8978,
9146
]
} | 28,245 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getIpfsForAssets | function getIpfsForAssets(uint[] _ids) public view returns (bytes32[]) {
bytes32[] memory hashes = new bytes32[](_ids.length);
for (uint i = 0; i < _ids.length; i++) {
Asset memory asset = assets[_ids[i]];
hashes[i] = asset.ipfsHash;
}
return hashes;
}
| /// @notice Function to get array of ipfsHashes for specific assets
/// @dev need for data parsing on frontend efficiently
/// @param _ids is array of ids
/// @return bytes32 array of hashes | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
9360,
9686
]
} | 28,246 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAttributesForAssets | function getAttributesForAssets(uint[] _ids) public view returns(uint[]) {
uint[] memory attributes = new uint[](_ids.length);
for (uint i = 0; i < _ids.length; i++) {
Asset memory asset = assets[_ids[i]];
attributes[i] = asset.attributes;
}
return attributes;
}
| /// @notice method that returns attributes for many assets | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
9753,
10097
]
} | 28,247 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getAssetPackData | function getAssetPackData(uint _assetPackId) public view
returns(bytes32, address, uint, uint[], uint[], bytes32[], string, string, bytes32) {
require(_assetPackId < numberOfAssetPacks);
AssetPack memory assetPack = assetPacks[_assetPackId];
bytes32[] memory hashes = new bytes32[](assetPack.assetIds.... | /// @notice Function to get ipfs hash and id for all assets in one asset pack
/// @param _assetPackId is id of asset pack
/// @return two arrays with data | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
10270,
11210
]
} | 28,248 | |||
AssetManager | AssetManager.sol | 0x80d774ffd99ad3321497064a2713bf2f89eeb5d6 | Solidity | AssetManager | contract AssetManager is Ownable {
struct Asset {
uint id;
uint packId;
/// atributes field is going to be 3 digit uint where every digit can be "1" or "2"
/// 1st digit will tell us if asset is background 1 - true / 2 - false
/// 2nd digit will tell us if rotation is... | getCoversForPacks | function getCoversForPacks(uint[] _packIds) public view returns (bytes32[]) {
require(_packIds.length > 0);
bytes32[] memory covers = new bytes32[](_packIds.length);
for (uint i = 0; i < _packIds.length; i++) {
AssetPack memory assetPack = assetPacks[_packIds[i]];
covers[i] = assetPack.... | /// @notice Function to get cover image for every assetpack
/// @param _packIds is array of asset pack ids
/// @return bytes32[] array of hashes | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://20eb13bde8c62e2757259205a9859437c8f7d109b86a11546c70a5e074db9ac3 | {
"func_code_index": [
11701,
12098
]
} | 28,249 | |||
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | 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() {
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() {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
261,
314
]
} | 28,250 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | 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() {
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) onlyOwner public {
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.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
637,
813
]
} | 28,251 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | BasicToken | contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address => bool) public allowedAddresses;
mapp... | /**
* @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(canTransfer(msg.sender));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Tr... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
1176,
1566
]
} | 28,252 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | BasicToken | contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) balances;
// allowedAddresses will be able to transfer even when locked
// lockedAddresses will *not* be able to transfer even when *not locked*
mapping(address => bool) public allowedAddresses;
mapp... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
1772,
1888
]
} | 28,253 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(canTransfer(msg.sender));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
392,
980
]
} | 28,254 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
1612,
1802
]
} | 28,255 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
2126,
2271
]
} | 28,256 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
2516,
2787
]
} | 28,257 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | BurnableToken | contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
225,
760
]
} | 28,258 |
BANGI | BANGI.sol | 0x7772ce1b1bfdb4893f20dbc48434c95ad49afd7a | Solidity | BANGI | contract BANGI is BurnableToken {
string public constant name = "BANGI";
string public constant symbol = "BONG";
uint public constant decimals = 18;
// there is no problem in using * here instead of .mul()
uint256 public constant initialSupply = 1000000000 * (10 ** uint256(decimals));
... | BANGI | function BANGI () {
totalSupply = initialSupply;
balances[msg.sender] = initialSupply; // Send all tokens to owner
allowedAddresses[owner] = true;
}
| // Constructors | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://fc0f270ed0057971370f41f9c7c1367dfb0e397fcb03003cea6ea5ebcb12ea44 | {
"func_code_index": [
337,
522
]
} | 28,259 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
60,
124
]
} | 28,260 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
232,
309
]
} | 28,261 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
546,
623
]
} | 28,262 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
946,
1042
]
} | 28,263 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
1326,
1407
]
} | 28,264 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
1615,
1712
]
} | 28,265 | ||
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | SCCToken | contract SCCToken is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to custom... | //name this contract whatever you'd like | LineComment | SCCToken | function SCCToken(
) {
balances[msg.sender] = 100000000000000000; // Give the creator all initial tokens (100000 for example)
totalSupply = 100000000000000000; // Update total supply (100000 for example)
name = "Swan City Coin"; ... | //human 0.1 standard. Just an arbitrary versioning scheme.
//
// CHANGE THESE VALUES FOR YOUR TOKEN
//
//make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
1157,
1728
]
} | 28,266 |
SCCToken | SCCToken.sol | 0x4e5133528b96432669152c4bac5bab8d40075753 | Solidity | SCCToken | contract SCCToken is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to custom... | //name this contract whatever you'd like | LineComment | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.26+commit.4563c3fc | None | bzzr://758790087e1e5a9cf718a9e635d537e10527c9c9ede65228f22f7da7affabec9 | {
"func_code_index": [
1789,
2594
]
} | 28,267 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public override view returns (uint256){
return _totalSupply;
}
| /** ERC20Interface function's implementation **/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
791,
895
]
} | 28,268 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public override view returns (uint256 balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
1119,
1256
]
} | 28,269 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint256 tokens) public override returns (bool success) {
// prevent transfer to 0x0, use burn instead
require(address(to) != address(0));
require(balances[msg.sender] >= tokens );
require(balances[to] + tokens >= balances[to]);
balances[msg.sender] = ... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
1600,
2103
]
} | 28,270 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint256 tokens) public override returns (bool success){
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender,spender,tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
2387,
2609
]
} | 28,271 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint256 tokens) public override returns (bool success){
require(tokens <= allowed[from][msg.sender]); //check allowance
require(balances[from] >= tokens);
balances[from] = balances[from].sub(tokens);
balances[to] = balances[to].add(tokens... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfe... | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
3146,
3634
]
} | 28,272 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public override view returns (uint256 remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
3919,
4083
]
} | 28,273 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | burnTokens | function burnTokens(uint256 _amount) public {
_burn(_amount, msg.sender);
}
| // ------------------------------------------------------------------------
// Burn the `_amount` amount of tokens from the calling `account`
// @params _amount the amount of tokens to burn
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
4376,
4470
]
} | 28,274 |
Token | Token.sol | 0xf8d778219d253df289da5f43e2711124ff3953c2 | Solidity | Token | contract Token is ERC20Interface, Owned {
using SafeMath for uint256;
string public symbol = "RIZE";
string public name = "RIZE";
uint256 public decimals = 18;
uint256 _totalSupply = 25e7* 10 ** (decimals);
mapping(address => uint256) balances;
mapping(address => mapping(addre... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | _burn | function _burn(uint256 _amount, address _account) internal {
require(balances[_account] >= _amount, "insufficient account balance");
_totalSupply = _totalSupply.sub(_amount);
balances[address(_account)] = balances[address(_account)].sub(_amount);
emit Transfer(address(_account), address(0), _amount)... | // ------------------------------------------------------------------------
// @dev Internal function that burns an amount of the token from a given account
// @param _amount The amount that will be burnt
// @param _account The tokens to burn from
// ---------------------------------------------------------------------... | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://81bde1d53b8f19870c83d0e3814a97e63b82c6a364bca0484ce28b1778d0d3b1 | {
"func_code_index": [
4822,
5171
]
} | 28,275 |
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
962,
1083
]
} | 28,276 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
1303,
1432
]
} | 28,277 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
1776,
2058
]
} | 28,278 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
2566,
2779
]
} | 28,279 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
3310,
3673
]
} | 28,280 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
3956,
4112
]
} | 28,281 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
4467,
4789
]
} | 28,282 | ||
Xcoin | Xcoin.sol | 0xdeee1b75ae63c92d6030839eea92260ccb1b9781 | Solidity | Xcoin | contract Xcoin is ERC20Interface, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------------... | /**
ERC20 Token, with the addition of symbol, name and decimals and assisted token transfers
*/ | NatSpecMultiLine | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | {
"func_code_index": [
4981,
5040
]
} | 28,283 | |||
XDEFIDistribution | XDEFIDistribution.sol | 0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef | Solidity | XDEFIDistribution | contract XDEFIDistribution is IXDEFIDistribution, ERC721Enumerable {
address internal constant ZERO_ADDRESS = address(0);
uint256 internal constant ZERO_UINT256 = uint256(0);
uint256 internal constant ONE_UINT256 = uint256(1);
uint256 internal constant ONE_HUNDRED_UINT256 = uint256(100);
ui... | /// @dev Handles distributing XDEFI to NFTs that have locked up XDEFI for various durations of time. | NatSpecSingleLine | acceptOwnership | function acceptOwnership() external {
if (pendingOwner != msg.sender) revert Unauthorized();
emit OwnershipAccepted(owner, msg.sender);
owner = msg.sender;
pendingOwner = ZERO_ADDRESS;
}
| /*******************/ | NatSpecMultiLine | v0.8.12+commit.f00d7308 | MIT | ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f | {
"func_code_index": [
5325,
5559
]
} | 28,284 |
XDEFIDistribution | XDEFIDistribution.sol | 0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef | Solidity | XDEFIDistribution | contract XDEFIDistribution is IXDEFIDistribution, ERC721Enumerable {
address internal constant ZERO_ADDRESS = address(0);
uint256 internal constant ZERO_UINT256 = uint256(0);
uint256 internal constant ONE_UINT256 = uint256(1);
uint256 internal constant ONE_HUNDRED_UINT256 = uint256(100);
ui... | /// @dev Handles distributing XDEFI to NFTs that have locked up XDEFI for various durations of time. | NatSpecSingleLine | emergencyUnlock | function emergencyUnlock(uint256 tokenId_, address destination_) external noReenter updateDistributableAtEnd returns (uint256 amountUnlocked_) {
// Revert if not in emergency mode.
if (!inEmergencyMode) revert NotInEmergencyMode();
// Revert if caller is not the token's owner, not approved for all the ... | /**********************/ | NatSpecMultiLine | v0.8.12+commit.f00d7308 | MIT | ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f | {
"func_code_index": [
7021,
8435
]
} | 28,285 |
XDEFIDistribution | XDEFIDistribution.sol | 0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef | Solidity | XDEFIDistribution | contract XDEFIDistribution is IXDEFIDistribution, ERC721Enumerable {
address internal constant ZERO_ADDRESS = address(0);
uint256 internal constant ZERO_UINT256 = uint256(0);
uint256 internal constant ONE_UINT256 = uint256(1);
uint256 internal constant ONE_HUNDRED_UINT256 = uint256(100);
ui... | /// @dev Handles distributing XDEFI to NFTs that have locked up XDEFI for various durations of time. | NatSpecSingleLine | relockBatch | function relockBatch(
uint256[] calldata tokenIds_,
uint256 lockAmount_,
uint256 duration_,
uint256 bonusMultiplier_,
address destination_
) external noReenter updatePointsPerUnitAtStart updateDistributableAtEnd returns (uint256 amountUnlocked_, uint256 newTokenId_) {
// Handle the unlock... | /****************************/ | NatSpecMultiLine | v0.8.12+commit.f00d7308 | MIT | ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f | {
"func_code_index": [
12467,
13049
]
} | 28,286 |
XDEFIDistribution | XDEFIDistribution.sol | 0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef | Solidity | XDEFIDistribution | contract XDEFIDistribution is IXDEFIDistribution, ERC721Enumerable {
address internal constant ZERO_ADDRESS = address(0);
uint256 internal constant ZERO_UINT256 = uint256(0);
uint256 internal constant ONE_UINT256 = uint256(1);
uint256 internal constant ONE_HUNDRED_UINT256 = uint256(100);
ui... | /// @dev Handles distributing XDEFI to NFTs that have locked up XDEFI for various durations of time. | NatSpecSingleLine | attributesOf | function attributesOf(uint256 tokenId_)
external
view
returns (
uint256 tier_,
uint256 credits_,
uint256 withdrawable_,
uint256 expiry_
)
{
// Revert if the token does not exist.
if (!_exists(tokenId_)) revert TokenDoesNotExist();
credits_ = cred... | /*****************/ | NatSpecMultiLine | v0.8.12+commit.f00d7308 | MIT | ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f | {
"func_code_index": [
13644,
14176
]
} | 28,287 |
XDEFIDistribution | XDEFIDistribution.sol | 0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef | Solidity | XDEFIDistribution | contract XDEFIDistribution is IXDEFIDistribution, ERC721Enumerable {
address internal constant ZERO_ADDRESS = address(0);
uint256 internal constant ZERO_UINT256 = uint256(0);
uint256 internal constant ONE_UINT256 = uint256(1);
uint256 internal constant ONE_HUNDRED_UINT256 = uint256(100);
ui... | /// @dev Handles distributing XDEFI to NFTs that have locked up XDEFI for various durations of time. | NatSpecSingleLine | _consume | function _consume(
uint256 tokenId_,
uint256 amount_,
address consumer_
) internal returns (uint256 remainingCredits_) {
remainingCredits_ = creditsOf[tokenId_];
// Revert if credits to decrement is greater than credits of nft.
if (amount_ > remainingCredits_) revert InsufficientCredits... | /**********************/ | NatSpecMultiLine | v0.8.12+commit.f00d7308 | MIT | ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f | {
"func_code_index": [
19528,
20113
]
} | 28,288 |
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | purchase | function purchase(uint256 _amount) external payable {
require(price > 0, "BattleRoyale: Token price is zero");
require(
battleState == BATTLE_STATE.STANDBY,
"BattleRoyale: Current battle state is not ready to purchase tokens"
);
require(
maxSupply > 0 && totalSupply < maxSupply,
"BattleRoyale: T... | /**
* @dev External function to purchase tokens.
* @param _amount Token amount to buy
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3126,
4427
]
} | 28,289 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setStartingTime | function setStartingTime(uint256 _newTime) external onlyOwner {
startingTime = _newTime;
emit StartingTimeSet(_newTime);
}
| /**
* @dev External function to set starting time. This function can be called only by owner.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4534,
4669
]
} | 28,290 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | startBattle | function startBattle() external onlyOwner {
require(
bytes(prizeTokenURI).length > 0 && inPlay.length > 1,
"BattleRoyale: Tokens in game are not enough to play"
);
battleState = BATTLE_STATE.RUNNING;
emit BattleStarted(address(this), inPlay);
}
| /**
* @dev External function to start the battle. This function can be called only by owner.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4775,
5052
]
} | 28,291 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | endBattle | function endBattle(uint256 _winnerTokenId) external onlyOwner {
require(battleState == BATTLE_STATE.RUNNING, "BattleRoyale: Battle is not started");
battleState = BATTLE_STATE.ENDED;
uint256 tokenId = totalSupply + 1;
address winnerAddress = ownerOf(_winnerTokenId);
_safeMint(winnerAddress, tokenId);
str... | /**
* @dev External function to end the battle. This function can be called only by owner.
* @param _winnerTokenId Winner token Id in battle
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5209,
5717
]
} | 28,292 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setBaseURI | function setBaseURI(string memory _tokenURI) external onlyOwner {
baseURI = _tokenURI;
emit BaseURISet(baseURI);
}
| /**
* @dev External function to set the base token URI. This function can be called only by owner.
* @param _tokenURI New base token uri
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5870,
5997
]
} | 28,293 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setDefaultTokenURI | function setDefaultTokenURI(string memory _tokenURI) external onlyOwner {
defaultTokenURI = _tokenURI;
emit DefaultTokenURISet(defaultTokenURI);
}
| /**
* @dev External function to set the default token URI. This function can be called only by owner.
* @param _tokenURI New default token uri
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6156,
6315
]
} | 28,294 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setPrizeTokenURI | function setPrizeTokenURI(string memory _tokenURI) external onlyOwner {
prizeTokenURI = _tokenURI;
emit PrizeTokenURISet(prizeTokenURI);
}
| /**
* @dev External function to set the prize token URI. This function can be called only by owner.
* @param _tokenURI New prize token uri
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6470,
6621
]
} | 28,295 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setPrice | function setPrice(uint256 _price) external onlyOwner {
price = _price;
emit PriceSet(price);
}
| /**
* @dev External function to set the token price. This function can be called only by owner.
* @param _price New token price
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
6765,
6872
]
} | 28,296 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setUnitsPerTransaction | function setUnitsPerTransaction(uint256 _unitsPerTransaction) external onlyOwner {
unitsPerTransaction = _unitsPerTransaction;
emit UnitsPerTransactionSet(unitsPerTransaction);
}
| /**
* @dev External function to set the limit of buyable token amounts. This function can be called only by owner.
* @param _unitsPerTransaction New purchasable token amounts per transaction
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
7079,
7270
]
} | 28,297 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | setMaxSupply | function setMaxSupply(uint256 _maxSupply) external onlyOwner {
maxSupply = _maxSupply;
emit MaxSupplySet(maxSupply);
}
| /**
* @dev External function to set max supply. This function can be called only by owner.
* @param _maxSupply New maximum token amounts
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
7423,
7554
]
} | 28,298 | ||||
BattleRoyale | contracts/BattleRoyaleMintingNew.sol | 0x8922ee819260382d31e4266c332316c1e6f1a7a0 | Solidity | BattleRoyale | contract BattleRoyale is ERC721URIStorage, Ownable {
using SafeERC20 for IERC20;
using Strings for uint256;
/// @notice Event emitted when contract is deployed.
event BattleRoyaleDeployed();
/// @notice Event emitted when owner withdrew the ETH.
event EthWithdrew(address receiver);
/// @notice Event em... | /**
* Fallback function to receive ETH
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
7606,
7637
]
} | 28,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.