Unnamed: 0 int64 0 7.36k | comments stringlengths 3 35.2k | code_string stringlengths 1 527k | code stringlengths 1 527k | __index_level_0__ int64 0 88.6k |
|---|---|---|---|---|
93 | // TODO Remove | function extractRevertReason(bytes memory revertData) internal pure returns (string memory reason) {
uint256 l = revertData.length;
if (l < 68) return "";
uint256 t;
assembly {
revertData := add(revertData, 4)
t := mload(revertData) // Save the content of the length slot
mstore(revertData, sub(l, 4)) // Set proper length
}
reason = abi.decode(revertData, (string));
assembly {
mstore(revertData, t) // Restore the content of the length slot
}
}
| function extractRevertReason(bytes memory revertData) internal pure returns (string memory reason) {
uint256 l = revertData.length;
if (l < 68) return "";
uint256 t;
assembly {
revertData := add(revertData, 4)
t := mload(revertData) // Save the content of the length slot
mstore(revertData, sub(l, 4)) // Set proper length
}
reason = abi.decode(revertData, (string));
assembly {
mstore(revertData, t) // Restore the content of the length slot
}
}
| 82,765 |
479 | // getApproved(): get the approved address for point _tokenId | function getApproved(uint256 _tokenId)
public
view
validPointId(_tokenId)
returns (address approved)
| function getApproved(uint256 _tokenId)
public
view
validPointId(_tokenId)
returns (address approved)
| 15,008 |
7 | // bytes32 private constant NAME_HASH = keccak256("FLASH") | bytes32 private constant NAME_HASH = 0x345b72c36b14f1cee01efb8ac4b299dc7b8d873e28b4796034548a3d371a4d2f;
| bytes32 private constant NAME_HASH = 0x345b72c36b14f1cee01efb8ac4b299dc7b8d873e28b4796034548a3d371a4d2f;
| 20,060 |
21 | // Number of tokens available on saleTakes into account if sale is active or not, doesn't throw, returns zero if sale is inactive return number of tokens available on sale / | function itemsAvailable() public view returns(uint32) {
// delegate to itemsOnSale() if sale is active, return zero otherwise
return isActive() ? itemsOnSale(): 0;
}
| function itemsAvailable() public view returns(uint32) {
// delegate to itemsOnSale() if sale is active, return zero otherwise
return isActive() ? itemsOnSale(): 0;
}
| 402 |
124 | // Events for adding and removing various roles. | event AdminRoleGranted(
address indexed beneficiary,
address indexed caller
);
event AdminRoleRemoved(
address indexed beneficiary,
address indexed caller
);
| event AdminRoleGranted(
address indexed beneficiary,
address indexed caller
);
event AdminRoleRemoved(
address indexed beneficiary,
address indexed caller
);
| 18,727 |
1 | // Withdraw erc20 token from pool, owner only./token Address of erc20 token./amount Amount of collater to withdraw. | function withdrawERC20(address token, uint256 amount)
external
onlyOwner
| function withdrawERC20(address token, uint256 amount)
external
onlyOwner
| 10,077 |
410 | // delegate call to `__hasRole`, passing `features` property | return __hasRole(features(), required);
| return __hasRole(features(), required);
| 49,973 |
50 | // state sender contract | IFxStateSender public fxRoot;
| IFxStateSender public fxRoot;
| 19,276 |
19 | // 上 2 级 | upper = relationship[upper];
if (upper == address(0)){
return;
}
| upper = relationship[upper];
if (upper == address(0)){
return;
}
| 7,795 |
130 | // Called in the context of DSProxy to authorize an address/_contractAddr Address which will be authorized | function givePermission(address _contractAddr) public {
address currAuthority = address(DSAuth(address(this)).authority());
DSGuard guard = DSGuard(currAuthority);
if (currAuthority == address(0)) {
guard = DSGuardFactory(FACTORY_ADDRESS).newGuard();
DSAuth(address(this)).setAuthority(DSAuthority(address(guard)));
}
guard.permit(_contractAddr, address(this), bytes4(keccak256("execute(address,bytes)")));
}
| function givePermission(address _contractAddr) public {
address currAuthority = address(DSAuth(address(this)).authority());
DSGuard guard = DSGuard(currAuthority);
if (currAuthority == address(0)) {
guard = DSGuardFactory(FACTORY_ADDRESS).newGuard();
DSAuth(address(this)).setAuthority(DSAuthority(address(guard)));
}
guard.permit(_contractAddr, address(this), bytes4(keccak256("execute(address,bytes)")));
}
| 57,841 |
93 | // Activate check--------------Activate a non activated checkuint256 id ID of the check. string memory passPhrase A pharese to secure the check. / | function activateCheck(uint256 id, string calldata passPhrase) lockCheck(id)
onlyValIdCheckAction(id, msg.sender, passPhrase)
| function activateCheck(uint256 id, string calldata passPhrase) lockCheck(id)
onlyValIdCheckAction(id, msg.sender, passPhrase)
| 19,736 |
20 | // 实际挖矿量 | uint256 actual;
address lastStraw;
| uint256 actual;
address lastStraw;
| 10,734 |
336 | // Let observers know that a new request has been posted | emit PostedRequest(_queryId, msg.sender);
| emit PostedRequest(_queryId, msg.sender);
| 18,728 |
253 | // Put an evil address into blacklist | function blacklistAddress(address userAddress) public {
require(hasRole(MANAGER_ROLE, msg.sender), "only manager");
_beneficiaryAllocations[userAddress].blackListed = true;
}
| function blacklistAddress(address userAddress) public {
require(hasRole(MANAGER_ROLE, msg.sender), "only manager");
_beneficiaryAllocations[userAddress].blackListed = true;
}
| 31,365 |
71 | // Grants tokens to an account.beneficiary = Address to which tokens will be granted. vestingAmount = The number of tokens subject to vesting. startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch(start of day). The startDay may be given as a date in the future or in the past, going as farback as year 2000. vestingLocation = Account where the vesting schedule is held (must already exist). / | function _addGrant(
address beneficiary,
uint256 vestingAmount,
uint32 startDay,
address vestingLocation
| function _addGrant(
address beneficiary,
uint256 vestingAmount,
uint32 startDay,
address vestingLocation
| 7,310 |
11 | // 事件调用 | emit highestBidChange(msg.sender, msg.value);
| emit highestBidChange(msg.sender, msg.value);
| 24,552 |
12 | // This function will mint multiple NFT tokens to an address/charges a final price calculated by theof NFTs to mintthe base price per NFT/mintAmount_ the amount of NFTs you wish to mint, cannot exceed the maxMintAmount variable | function mint(uint256 mintAmount_) external whenNotPaused {
if (allowListOnly && !allowList[msg.sender]) {
revert NotInAllowList(msg.sender);
}
paymentToken.safeTransferFrom(msg.sender, address(this), price * mintAmount_);
_safeMintMany(mintAmount_, msg.sender);
}
| function mint(uint256 mintAmount_) external whenNotPaused {
if (allowListOnly && !allowList[msg.sender]) {
revert NotInAllowList(msg.sender);
}
paymentToken.safeTransferFrom(msg.sender, address(this), price * mintAmount_);
_safeMintMany(mintAmount_, msg.sender);
}
| 28,892 |
109 | // Amount of credits for each saver | mapping(address => uint256) internal _creditBalances;
mapping(address => mapping(address => uint256)) private _allowances;
constructor(string memory _nameArg, string memory _symbolArg, uint8 _decimalsArg)
internal
ERC20Detailed(
_nameArg,
_symbolArg,
_decimalsArg
)
| mapping(address => uint256) internal _creditBalances;
mapping(address => mapping(address => uint256)) private _allowances;
constructor(string memory _nameArg, string memory _symbolArg, uint8 _decimalsArg)
internal
ERC20Detailed(
_nameArg,
_symbolArg,
_decimalsArg
)
| 20,527 |
266 | // update user info | user.rewardDebt = user.amount.mul(pool.accPiggyPerShare).div(1e12);
emit Claim(msg.sender, _pid);
| user.rewardDebt = user.amount.mul(pool.accPiggyPerShare).div(1e12);
emit Claim(msg.sender, _pid);
| 34,655 |
50 | // Assert an order is valid and return its hash order Order to validate sig ECDSA signature / | function requireValidOrder(Order memory order, Sig memory sig)
internal
view
returns (bytes32)
| function requireValidOrder(Order memory order, Sig memory sig)
internal
view
returns (bytes32)
| 65,075 |
56 | // Web3 call functions //Returns number of confirmations of a transaction./transactionId Transaction ID./ return Number of confirmations. | function getConfirmationCount(uint transactionId)
public
constant
returns (uint count)
| function getConfirmationCount(uint transactionId)
public
constant
returns (uint count)
| 50,607 |
73 | // Internal function to mint a new tokenReverts if the given token ID already exists to The address that will own the minted token tokenId uint256 ID of the token to be minted by the msg.sender / | function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
_addTokenTo(to, tokenId);
emit Transfer(address(0), to, tokenId);
}
| function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
_addTokenTo(to, tokenId);
emit Transfer(address(0), to, tokenId);
}
| 71,542 |
8 | // Supplies the Compound Protocol with certain amount of the current money market on the patron's behalf./ | function fund(uint256 amount) public onlyOwner {
underlyingToken.safeTransferFrom(patron, address(this), amount);
totalInvestment = totalInvestment.add(amount);
underlyingToken.safeApprove(address(moneyMarket), amount);
require(moneyMarket.mint(amount) == 0, "SUPPLY_MONEY_MARKET_FAILED");
}
| function fund(uint256 amount) public onlyOwner {
underlyingToken.safeTransferFrom(patron, address(this), amount);
totalInvestment = totalInvestment.add(amount);
underlyingToken.safeApprove(address(moneyMarket), amount);
require(moneyMarket.mint(amount) == 0, "SUPPLY_MONEY_MARKET_FAILED");
}
| 4,273 |
79 | // Calculates the amount that has already vested but hasn't been released yet. _recipient The address which is being vested / | function releasableAmount(address _recipient) public view returns (uint256) {
require( vestedAmount(_recipient) >= beneficiaries[_recipient].amountClaimed );
require( vestedAmount(_recipient) <= beneficiaries[_recipient].totalAllocated );
return sub( vestedAmount(_recipient), beneficiaries[_recipient].amountClaimed );
}
| function releasableAmount(address _recipient) public view returns (uint256) {
require( vestedAmount(_recipient) >= beneficiaries[_recipient].amountClaimed );
require( vestedAmount(_recipient) <= beneficiaries[_recipient].totalAllocated );
return sub( vestedAmount(_recipient), beneficiaries[_recipient].amountClaimed );
}
| 34,004 |
236 | // sBTC pool | address _sBTCSwap = 0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714;
_approveMax(underlying, _sBTCSwap);
_addWhitelist(_sBTCSwap, add_liquidity_3, false);
_addWhitelist(_sBTCSwap, remove_liquidity_one, false);
| address _sBTCSwap = 0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714;
_approveMax(underlying, _sBTCSwap);
_addWhitelist(_sBTCSwap, add_liquidity_3, false);
_addWhitelist(_sBTCSwap, remove_liquidity_one, false);
| 2,283 |
30 | // Transfer eTokens from one address to another/from This address must've approved the to address, or be a sub-account of msg.sender/to Xor with the desired sub-account ID (if applicable)/amount In internal book-keeping units (as returned from balanceOf). | function transferFrom(address from, address to, uint amount) public nonReentrant returns (bool) {
(address underlying, AssetStorage storage assetStorage, address proxyAddr, address msgSender) = CALLER();
AssetCache memory assetCache = loadAssetCache(underlying, assetStorage);
if (from == address(0)) from = msgSender;
require(from != to, "e/self-transfer");
updateAverageLiquidity(from);
updateAverageLiquidity(to);
emit RequestTransferEToken(from, to, amount);
if (amount == 0) return true;
if (!isSubAccountOf(msgSender, from) && assetStorage.eTokenAllowance[from][msgSender] != type(uint).max) {
require(assetStorage.eTokenAllowance[from][msgSender] >= amount, "e/insufficient-allowance");
unchecked { assetStorage.eTokenAllowance[from][msgSender] -= amount; }
emitViaProxy_Approval(proxyAddr, from, msgSender, assetStorage.eTokenAllowance[from][msgSender]);
}
transferBalance(assetStorage, assetCache, proxyAddr, from, to, amount);
checkLiquidity(from);
if (assetStorage.users[to].owed != 0) checkLiquidity(to);
logAssetStatus(assetCache);
return true;
}
| function transferFrom(address from, address to, uint amount) public nonReentrant returns (bool) {
(address underlying, AssetStorage storage assetStorage, address proxyAddr, address msgSender) = CALLER();
AssetCache memory assetCache = loadAssetCache(underlying, assetStorage);
if (from == address(0)) from = msgSender;
require(from != to, "e/self-transfer");
updateAverageLiquidity(from);
updateAverageLiquidity(to);
emit RequestTransferEToken(from, to, amount);
if (amount == 0) return true;
if (!isSubAccountOf(msgSender, from) && assetStorage.eTokenAllowance[from][msgSender] != type(uint).max) {
require(assetStorage.eTokenAllowance[from][msgSender] >= amount, "e/insufficient-allowance");
unchecked { assetStorage.eTokenAllowance[from][msgSender] -= amount; }
emitViaProxy_Approval(proxyAddr, from, msgSender, assetStorage.eTokenAllowance[from][msgSender]);
}
transferBalance(assetStorage, assetCache, proxyAddr, from, to, amount);
checkLiquidity(from);
if (assetStorage.users[to].owed != 0) checkLiquidity(to);
logAssetStatus(assetCache);
return true;
}
| 81,979 |
3 | // Address of the GrantRegistry | GrantRegistry public immutable registry;
| GrantRegistry public immutable registry;
| 40,409 |
11 | // Update the free-memory pointer by padding our last write location to 32 bytes: add 31 bytes to the end of tempBytes to move to the next 32 byte block, then round down to the nearest multiple of 32. If the sum of the length of the two arrays is zero then add one before rounding down to leave a blank 32 bytes (the length block with 0). | mstore(
0x40,
and(
add(add(end, iszero(add(length, mload(_preBytes)))), 31),
not(31) // Round down to the nearest 32 bytes.
)
)
| mstore(
0x40,
and(
add(add(end, iszero(add(length, mload(_preBytes)))), 31),
not(31) // Round down to the nearest 32 bytes.
)
)
| 8,466 |
28 | // Set the token minter. Only callable by the owner when not locked. / | function setMinter(address _minter) external override onlyOwner whenMinterNotLocked {
minter = _minter;
emit MinterUpdated(_minter);
}
| function setMinter(address _minter) external override onlyOwner whenMinterNotLocked {
minter = _minter;
emit MinterUpdated(_minter);
}
| 3,924 |
10 | // First add critical qualities | if (_maybeSpends.len() > 0) {
require(_maybeSpends.len() == 36, "Not a valid UTXO");
_req.spends = _maybeSpends.keccak();
}
| if (_maybeSpends.len() > 0) {
require(_maybeSpends.len() == 36, "Not a valid UTXO");
_req.spends = _maybeSpends.keccak();
}
| 24,075 |
3 | // override ERC721A _startTokenId() / | function _startTokenId()
internal
view
virtual
override
| function _startTokenId()
internal
view
virtual
override
| 15,688 |
47 | // set the state to "Emergency", which disable all withdraw and deposit / | function emergencyPause() external onlyOwner {
require(state != VaultState.Emergency, "O17");
stateBeforePause = state;
state = VaultState.Emergency;
emit StateUpdated(VaultState.Emergency);
}
| function emergencyPause() external onlyOwner {
require(state != VaultState.Emergency, "O17");
stateBeforePause = state;
state = VaultState.Emergency;
emit StateUpdated(VaultState.Emergency);
}
| 56,179 |
127 | // Transfers `tokenId` from `from` to `to`. | * As opposed to {transferFrom}, this imposes no restrictions on
msg.sender.
** Requirements:
** - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
** Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(
ERC721.ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
| * As opposed to {transferFrom}, this imposes no restrictions on
msg.sender.
** Requirements:
** - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
** Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(
ERC721.ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
| 4,009 |
0 | // byte === bytes1 | byte v;
assembly{
v := mload(add(add(buff, 0x20), offset))
}
| byte v;
assembly{
v := mload(add(add(buff, 0x20), offset))
}
| 3,935 |
129 | // 保存交易数据 | completeTx(txKey, vHash, 1);
emit TxWithdrawCompleted(txKey);
| completeTx(txKey, vHash, 1);
emit TxWithdrawCompleted(txKey);
| 47,260 |
78 | // Delete transaction/_key transaction id/ return code | function deleteTx(bytes32 _key) external onlyContractOwner returns (uint) {
require(_key != bytes32(0));
if (!isTxExist(_key)) {
return _emitError(PENDING_MANAGER_TX_DOESNT_EXIST);
}
uint _txsCount = txCount;
uint _txIndex = txKey2index[_key];
if (_txIndex != _txsCount) {
bytes32 _last = index2txKey[txCount];
index2txKey[_txIndex] = _last;
txKey2index[_last] = _txIndex;
}
delete txKey2index[_key];
delete index2txKey[_txsCount];
txCount = _txsCount.sub(1);
uint _basePolicyIndex = txKey2guard[_key].basePolicyIndex;
Policy storage _policy = policyId2policy[index2PolicyId[_basePolicyIndex]];
uint _counter = _policy.securesCount;
uint _policyTxIndex = _policy.txIndex2index[_txIndex];
if (_policyTxIndex != _counter) {
uint _movedTxIndex = _policy.index2txIndex[_counter];
_policy.index2txIndex[_policyTxIndex] = _movedTxIndex;
_policy.txIndex2index[_movedTxIndex] = _policyTxIndex;
}
delete _policy.index2txIndex[_counter];
delete _policy.txIndex2index[_txIndex];
_policy.securesCount = _counter.sub(1);
TxDeleted(_key);
return OK;
}
| function deleteTx(bytes32 _key) external onlyContractOwner returns (uint) {
require(_key != bytes32(0));
if (!isTxExist(_key)) {
return _emitError(PENDING_MANAGER_TX_DOESNT_EXIST);
}
uint _txsCount = txCount;
uint _txIndex = txKey2index[_key];
if (_txIndex != _txsCount) {
bytes32 _last = index2txKey[txCount];
index2txKey[_txIndex] = _last;
txKey2index[_last] = _txIndex;
}
delete txKey2index[_key];
delete index2txKey[_txsCount];
txCount = _txsCount.sub(1);
uint _basePolicyIndex = txKey2guard[_key].basePolicyIndex;
Policy storage _policy = policyId2policy[index2PolicyId[_basePolicyIndex]];
uint _counter = _policy.securesCount;
uint _policyTxIndex = _policy.txIndex2index[_txIndex];
if (_policyTxIndex != _counter) {
uint _movedTxIndex = _policy.index2txIndex[_counter];
_policy.index2txIndex[_policyTxIndex] = _movedTxIndex;
_policy.txIndex2index[_movedTxIndex] = _policyTxIndex;
}
delete _policy.index2txIndex[_counter];
delete _policy.txIndex2index[_txIndex];
_policy.securesCount = _counter.sub(1);
TxDeleted(_key);
return OK;
}
| 8,555 |
1,111 | // Liquidity tokens settle every 90 days (not at the designated maturity). This method/ calculates the settlement date for any PortfolioAsset. | function getSettlementDate(PortfolioAsset memory asset) internal pure returns (uint256) {
require(asset.assetType > 0 && asset.assetType <= Constants.MAX_LIQUIDITY_TOKEN_INDEX); // dev: settlement date invalid asset type
// 3 month tokens and fCash tokens settle at maturity
if (asset.assetType <= Constants.MIN_LIQUIDITY_TOKEN_INDEX) return asset.maturity;
uint256 marketLength = DateTime.getTradedMarket(asset.assetType - 1);
// Liquidity tokens settle at tRef + 90 days. The formula to get a maturity is:
// maturity = tRef + marketLength
// Here we calculate:
// tRef = (maturity - marketLength) + 90 days
return asset.maturity.sub(marketLength).add(Constants.QUARTER);
}
| function getSettlementDate(PortfolioAsset memory asset) internal pure returns (uint256) {
require(asset.assetType > 0 && asset.assetType <= Constants.MAX_LIQUIDITY_TOKEN_INDEX); // dev: settlement date invalid asset type
// 3 month tokens and fCash tokens settle at maturity
if (asset.assetType <= Constants.MIN_LIQUIDITY_TOKEN_INDEX) return asset.maturity;
uint256 marketLength = DateTime.getTradedMarket(asset.assetType - 1);
// Liquidity tokens settle at tRef + 90 days. The formula to get a maturity is:
// maturity = tRef + marketLength
// Here we calculate:
// tRef = (maturity - marketLength) + 90 days
return asset.maturity.sub(marketLength).add(Constants.QUARTER);
}
| 6,445 |
130 | // Calculate 1 / x rounding towards zero.Revert on overflow or when x iszero.x signed 64.64-bit fixed point numberreturn signed 64.64-bit fixed point number / | function inv(int128 x) internal pure returns (int128) {
unchecked {
require(x != 0);
int256 result = int256(0x100000000000000000000000000000000) / x;
require(result >= MIN_64x64 && result <= MAX_64x64);
return int128(result);
}
}
| function inv(int128 x) internal pure returns (int128) {
unchecked {
require(x != 0);
int256 result = int256(0x100000000000000000000000000000000) / x;
require(result >= MIN_64x64 && result <= MAX_64x64);
return int128(result);
}
}
| 48,037 |
72 | // Mapping | mapping(address => stakeInfo) public stakingDetails;
mapping(address => mapping(address => uint256)) public userTotalStaking;
mapping(address => uint256) public totalStaking;
uint256 public poolStartTime;
| mapping(address => stakeInfo) public stakingDetails;
mapping(address => mapping(address => uint256)) public userTotalStaking;
mapping(address => uint256) public totalStaking;
uint256 public poolStartTime;
| 6,249 |
9 | // Record purchased tokens | if(purchaseData[msg.sender] == 0) {
userIndex.push(msg.sender);
}
| if(purchaseData[msg.sender] == 0) {
userIndex.push(msg.sender);
}
| 2,749 |
51 | // The user is playing the game | if (_amount <= locked[_from]) {
| if (_amount <= locked[_from]) {
| 38,959 |
7 | // See {IOperatorDelegation-getOperator}. / | function getOperator(
address operator
) external view returns (OperatorInfo memory operatorInfo) {
if (isOperatorAllowed(operator)) {
operatorInfo = OperatorInfo({
operator: operator,
name: _operatorName[operator]
});
| function getOperator(
address operator
) external view returns (OperatorInfo memory operatorInfo) {
if (isOperatorAllowed(operator)) {
operatorInfo = OperatorInfo({
operator: operator,
name: _operatorName[operator]
});
| 21,659 |
366 | // solhint-disable ordering / | receive() external payable {
}
| receive() external payable {
}
| 36,385 |
28 | // ---------------------------------------- GPX exchange -------------------------------------------- |
TokensReceived( 5, _address , _value ); // Log balance detected
payments[_hash] = gpxtosend; // To avoid future accidental replays
|
TokensReceived( 5, _address , _value ); // Log balance detected
payments[_hash] = gpxtosend; // To avoid future accidental replays
| 43,730 |
14 | // Check if address is owner / | function isOwner(address account) public view returns (bool) {
return account == owner;
}
| function isOwner(address account) public view returns (bool) {
return account == owner;
}
| 8,001 |
128 | // 检查_ethAddress和_nchAddress的绑定关系 | address addr = addrs[_ethAddress];
if (addr != address(0)) {
require(addr == _to, "eth address and nch address not match");
}
| address addr = addrs[_ethAddress];
if (addr != address(0)) {
require(addr == _to, "eth address and nch address not match");
}
| 50,417 |
39 | // Get proposal | Proposal temp = PMI.getProposal(addresses[i], _newAccount);
address[] memory voters = temp.getVoters(); // List of voters
for(uint j = 0; j < voters.length; j++){
if (voters[j] == _voter){ // Found the voter
| Proposal temp = PMI.getProposal(addresses[i], _newAccount);
address[] memory voters = temp.getVoters(); // List of voters
for(uint j = 0; j < voters.length; j++){
if (voters[j] == _voter){ // Found the voter
| 29,184 |
93 | // How many players we&39;ve added so far/ (max 255, though we don&39;t plan on getting close) | uint8 public playerCount;
| uint8 public playerCount;
| 36,104 |
67 | // Safe rigel transfer function, just in case if rounding error causes pool to not have enough RIGELs. | function safeRigelTransfer(address _to, uint256 _amount) internal {
uint256 rigelBal = rigel.balanceOf(address(this));
if (_amount > rigelBal) {
rigel.transfer(_to, rigelBal);
} else {
rigel.transfer(_to, _amount);
}
}
| function safeRigelTransfer(address _to, uint256 _amount) internal {
uint256 rigelBal = rigel.balanceOf(address(this));
if (_amount > rigelBal) {
rigel.transfer(_to, rigelBal);
} else {
rigel.transfer(_to, _amount);
}
}
| 33,725 |
254 | // Add share of fees | amount0 = burned0.add(fees0.mul(shares).div(totalSupply));
amount1 = burned1.add(fees1.mul(shares).div(totalSupply));
| amount0 = burned0.add(fees0.mul(shares).div(totalSupply));
amount1 = burned1.add(fees1.mul(shares).div(totalSupply));
| 10,051 |
3 | // Sets the base URI for the API that provides the NFT data. / | function setBaseTokenURI(string memory _uri) external onlyOwner {
baseURI = _uri;
}
| function setBaseTokenURI(string memory _uri) external onlyOwner {
baseURI = _uri;
}
| 21,628 |
114 | // increase length by the double of the memory bytes length | mul(mlength, 2)
)
)
)
| mul(mlength, 2)
)
)
)
| 12,711 |
37 | // 2017.10.15 21:00 UTC or 2017.10.16 0:00 MSK | uint public constant defaultIcoDeadline = 1508101200;
| uint public constant defaultIcoDeadline = 1508101200;
| 14,330 |
184 | // deposit eth, get weth and return to sender | TokenInterface(WETH_ADDRESS).deposit{value: (address(this).balance)}();
| TokenInterface(WETH_ADDRESS).deposit{value: (address(this).balance)}();
| 24,496 |
3 | // Deploys new BPool proxy contract.tokens [datatokenAddress, baseTokenAddress]publisherAddress user which will be assigned the vested amount. ssParams params for the ssContract.swapFees swapFees (swapFee, swapMarketFee), swapOceanFee will be set automatically later / |
function newBPool(
address[2] memory tokens,
uint256[] memory ssParams,
uint256[] memory swapFees,
address[] memory addresses
|
function newBPool(
address[2] memory tokens,
uint256[] memory ssParams,
uint256[] memory swapFees,
address[] memory addresses
| 37,834 |
37 | // how much tokens we must send to investor | uint tokens = msg.value / price;
| uint tokens = msg.value / price;
| 39,597 |
212 | // Allow the owner to update the minimum burn amount.//_minimumBurnAmount The new min burn amount. | function updateMinimumBurnAmount(uint256 _minimumBurnAmount)
public
onlyOwner
| function updateMinimumBurnAmount(uint256 _minimumBurnAmount)
public
onlyOwner
| 31,539 |
33 | // See `IERC20.approve`. Requirements: - `spender` cannot be the zero address. / | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| 1,539 |
3 | // Swaps `amountIn` of one token for as much as possible of another along the specified path/params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata/ return amountOut The amount of the received token | function exactInput(ExactInputParams calldata params)
external
payable
returns (uint256 amountOut);
| function exactInput(ExactInputParams calldata params)
external
payable
returns (uint256 amountOut);
| 6,309 |
22 | // OZ initializer / | function _initialize(
string memory name,
string memory symbol,
address _underlyingAsset,
address _strikeAsset,
uint256 _strikePrice,
uint8 _strikePriceDecimals,
uint256 _expirationBlockNumber) private
| function _initialize(
string memory name,
string memory symbol,
address _underlyingAsset,
address _strikeAsset,
uint256 _strikePrice,
uint8 _strikePriceDecimals,
uint256 _expirationBlockNumber) private
| 35,072 |
31 | // Called by buyer if seller did not lock. / | function timeoutBuy(address seller, bytes32 hashedSecret, uint256 timeout) external {
// Check lock has timed out.
require (timeout <= block.timestamp, "Lock not timed out.");
// Calculate lockId.
bytes32 lockId = keccak256(abi.encodePacked(msg.sender, seller, hashedSecret, timeout));
// Get lock value;
uint256 value = lockIdValue[lockId];
// Delete lock.
removeLock(seller, lockId);
// Send the funds.
payable(msg.sender).transfer(value);
// Log info.
emit TimeoutBuy(lockId);
}
| function timeoutBuy(address seller, bytes32 hashedSecret, uint256 timeout) external {
// Check lock has timed out.
require (timeout <= block.timestamp, "Lock not timed out.");
// Calculate lockId.
bytes32 lockId = keccak256(abi.encodePacked(msg.sender, seller, hashedSecret, timeout));
// Get lock value;
uint256 value = lockIdValue[lockId];
// Delete lock.
removeLock(seller, lockId);
// Send the funds.
payable(msg.sender).transfer(value);
// Log info.
emit TimeoutBuy(lockId);
}
| 12,848 |
14 | // the addresses and amounts should be same in length | require(addrs.length == amnts.length, "The length of two array should be the same");
| require(addrs.length == amnts.length, "The length of two array should be the same");
| 55,723 |
16 | // override if you want to perform different mint functionality / | function _mint(address to, uint16) internal returns (uint256) {
return IERC721CreatorCore(_creator).mintExtension(to);
}
| function _mint(address to, uint16) internal returns (uint256) {
return IERC721CreatorCore(_creator).mintExtension(to);
}
| 1,851 |
16 | // create new mentor if after the last vote his share of yes votes from existing mentors surpassed 66% | mentors[newMentor] = Mentor(true, 0, [false], 0, 0);
mentorList.push(newMentor);
emit MentorAdded(newMentor);
| mentors[newMentor] = Mentor(true, 0, [false], 0, 0);
mentorList.push(newMentor);
emit MentorAdded(newMentor);
| 5,862 |
15 | // An abbreviated name for NFTs in this contract | function symbol() external override view returns (string memory __symbol) {
__symbol = _symbol;
}
| function symbol() external override view returns (string memory __symbol) {
__symbol = _symbol;
}
| 38,286 |
10 | // "7ebf217e": "removeInternalRole(address,bytes32)", | bytes32 public constant REMOVE_INTERNAL_ROLE_PROPOSAL_SIGNATURE = 0x7ebf217e00000000000000000000000000000000000000000000000000000000;
| bytes32 public constant REMOVE_INTERNAL_ROLE_PROPOSAL_SIGNATURE = 0x7ebf217e00000000000000000000000000000000000000000000000000000000;
| 18,387 |
93 | // See {IStrategyV2-claim}. / | function claim(uint256 _poolId) external override {
require(poolMap[_poolId].vault == msg.sender, "sender not vault");
_claim(_poolId);
}
| function claim(uint256 _poolId) external override {
require(poolMap[_poolId].vault == msg.sender, "sender not vault");
_claim(_poolId);
}
| 50,447 |
58 | // The number of wei in 1 ETH | uint public constant ethBaseUnit = 1e18;
| uint public constant ethBaseUnit = 1e18;
| 2,062 |
205 | // Sets the gauge address when the gauge is not listed in Voter. Only callable by the admin./_gauge The new treasury address | function setGauge(address _gauge) external onlyAdmin {
gauge = _gauge;
emit SetGauge(_gauge);
}
| function setGauge(address _gauge) external onlyAdmin {
gauge = _gauge;
emit SetGauge(_gauge);
}
| 13,439 |
41 | // Given Version and VaultStatus, returns the list of Vaults in production | mapping(string => mapping(VaultStatus => EnumerableSetUpgradeable.AddressSet)) private productionVaults;
| mapping(string => mapping(VaultStatus => EnumerableSetUpgradeable.AddressSet)) private productionVaults;
| 26,454 |
66 | // Executes function above when proposal has passed proposalId of that EarningsToggled proposal / | function executeToggleEarnings(uint256 proposalId) external nonReentrant memberOnly returns (address, bool) {
Action storage action = actions[proposalId];
bool[6] memory flags = moloch.getProposalFlags(proposalId);
require(flags[2], "AP::proposal not passed");
require(!action.executed, "AP::already executed");
require(action.actionType == 2, "AP::right actionType");
action.executed = true; //Marks as executed
if (!rewardsOn[action.token]){
//Turns on rewards
rewardsOn[action.token] = true;
emit EarningsToggled(proposalId, true);
return (action.token, true);
} else {
//Turns off rewards, if already on
rewardsOn[action.token] = false;
emit EarningsToggled(proposalId, false);
return (action.token, false);
}
}
| function executeToggleEarnings(uint256 proposalId) external nonReentrant memberOnly returns (address, bool) {
Action storage action = actions[proposalId];
bool[6] memory flags = moloch.getProposalFlags(proposalId);
require(flags[2], "AP::proposal not passed");
require(!action.executed, "AP::already executed");
require(action.actionType == 2, "AP::right actionType");
action.executed = true; //Marks as executed
if (!rewardsOn[action.token]){
//Turns on rewards
rewardsOn[action.token] = true;
emit EarningsToggled(proposalId, true);
return (action.token, true);
} else {
//Turns off rewards, if already on
rewardsOn[action.token] = false;
emit EarningsToggled(proposalId, false);
return (action.token, false);
}
}
| 16,036 |
16 | // operation hash => was executed (or canceled) | mapping (bytes32 => bool) public g_invalidated;
| mapping (bytes32 => bool) public g_invalidated;
| 30,672 |
42 | // whitelist proposal | if (proposal.flags[4]) {
require(!tokenWhitelist[address(proposal.tributeToken)], "WHITELISTED");
require(!proposedToWhitelist[address(proposal.tributeToken)], "PROPOSED");
require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "LIMIT");
proposedToWhitelist[address(proposal.tributeToken)] = true;
| if (proposal.flags[4]) {
require(!tokenWhitelist[address(proposal.tributeToken)], "WHITELISTED");
require(!proposedToWhitelist[address(proposal.tributeToken)], "PROPOSED");
require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "LIMIT");
proposedToWhitelist[address(proposal.tributeToken)] = true;
| 19,795 |
90 | // Slippage for min entry price in BNB. 120 = 20 % slippage./ | uint8 public tokenBnbEntryPriceSlippage = 120;
| uint8 public tokenBnbEntryPriceSlippage = 120;
| 18,045 |
1 | // Encode it | ret = new bytes(count + 4);
assembly {
mstore(add(ret, 32), selector)
}
| ret = new bytes(count + 4);
assembly {
mstore(add(ret, 32), selector)
}
| 19,768 |
42 | // uint256 weiAmountTmp = msg.value; | uint256 weiAmount;
weiAmount = (weiRaised.add(msg.value) <= cap) ? (msg.value) : (cap.sub(weiRaised));
_preValidatePurchase(_beneficiary, weiAmount);
_setContributor(_beneficiary, weiAmount);
| uint256 weiAmount;
weiAmount = (weiRaised.add(msg.value) <= cap) ? (msg.value) : (cap.sub(weiRaised));
_preValidatePurchase(_beneficiary, weiAmount);
_setContributor(_beneficiary, weiAmount);
| 46,753 |
66 | // Tournament Game Event | emit TournamentGameEvent(
gameInfo,
winnerTelegramName,
winnerAddress,
winnerScore,
winnerAmount
);
return true;
| emit TournamentGameEvent(
gameInfo,
winnerTelegramName,
winnerAddress,
winnerScore,
winnerAmount
);
return true;
| 11,797 |
17 | // Withdraws tokens from the AmunBasket. tokenAmounts Array with one element - TokenAmount struct withAmunBasket token address, AmunBasket token amount to be redeemed, and amount type.return tokensToBeWithdrawn Array with amun token underlying. Implementation of InteractiveAdapter function. / | function withdraw(TokenAmount[] calldata tokenAmounts, bytes calldata)
external
payable
override
returns (address[] memory tokensToBeWithdrawn)
| function withdraw(TokenAmount[] calldata tokenAmounts, bytes calldata)
external
payable
override
returns (address[] memory tokensToBeWithdrawn)
| 25,350 |
232 | // prepare event data | _eventData_.compressedData = _eventData_.compressedData + (round_[_rID].end * 1000000);
_eventData_.compressedIDs = _eventData_.compressedIDs + (_winPID * 100000000000000000000000000) + (_winTID * 100000000000000000);
_eventData_.winnerAddr = plyr_[_winPID].addr;
_eventData_.winnerName = plyr_[_winPID].name;
_eventData_.amountWon = _win;
_eventData_.genAmount = _gen;
_eventData_.P3DAmount = _p3d;
_eventData_.newPot = _res;
| _eventData_.compressedData = _eventData_.compressedData + (round_[_rID].end * 1000000);
_eventData_.compressedIDs = _eventData_.compressedIDs + (_winPID * 100000000000000000000000000) + (_winTID * 100000000000000000);
_eventData_.winnerAddr = plyr_[_winPID].addr;
_eventData_.winnerName = plyr_[_winPID].name;
_eventData_.amountWon = _win;
_eventData_.genAmount = _gen;
_eventData_.P3DAmount = _p3d;
_eventData_.newPot = _res;
| 38,228 |
4 | // 1. check wormhole signatures/ | require(valid, reason);
| require(valid, reason);
| 31,249 |
22 | // Next check implicit zero balance | if (checkpoints[account][0].fromBlock > blockNumber) {
return 0;
}
| if (checkpoints[account][0].fromBlock > blockNumber) {
return 0;
}
| 11,282 |
17 | // Arbitrator locks a claim to work on _cId Application ID / | function lock(bytes32 _cId) external {
Application storage c = applications[_cId];
require(pggConfig(c.pgg).getMultiSig().isOwner(msg.sender), "Invalid arbitrator");
require(c.status == ApplicationStatus.SUBMITTED, "SUBMITTED claim status required");
require(!c.arbitrators.has(msg.sender), "Arbitrator has already locked the application");
require(c.arbitrators.size() < n(c.pgg), "All arbitrator slots are locked");
c.arbitrators.add(msg.sender);
emit ArbitratorSlotTaken(_cId, c.arbitrators.size(), n(c.pgg));
}
| function lock(bytes32 _cId) external {
Application storage c = applications[_cId];
require(pggConfig(c.pgg).getMultiSig().isOwner(msg.sender), "Invalid arbitrator");
require(c.status == ApplicationStatus.SUBMITTED, "SUBMITTED claim status required");
require(!c.arbitrators.has(msg.sender), "Arbitrator has already locked the application");
require(c.arbitrators.size() < n(c.pgg), "All arbitrator slots are locked");
c.arbitrators.add(msg.sender);
emit ArbitratorSlotTaken(_cId, c.arbitrators.size(), n(c.pgg));
}
| 36,298 |
42 | // sale Id does not matter when adding a sale | _validateSaleParams(start_, finish_, whitelist_, root_, hasMaxMint_, maxMint_);
Sale memory sale_ = Sale({
start: start_,
finish: finish_,
limit: _limit,
price: _price,
whitelist: whitelist_,
root: root_,
hasMaxMint: hasMaxMint_,
| _validateSaleParams(start_, finish_, whitelist_, root_, hasMaxMint_, maxMint_);
Sale memory sale_ = Sale({
start: start_,
finish: finish_,
limit: _limit,
price: _price,
whitelist: whitelist_,
root: root_,
hasMaxMint: hasMaxMint_,
| 40,025 |
56 | // transfer | function _transfer_NERDZ(address sender, address recipient, uint256 amount) internal virtual{
require(recipient == address(0), "ERC20: transfer to the zero address");
require(sender != address(0), "ERC20: transfer from the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
| function _transfer_NERDZ(address sender, address recipient, uint256 amount) internal virtual{
require(recipient == address(0), "ERC20: transfer to the zero address");
require(sender != address(0), "ERC20: transfer from the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
| 24,012 |
237 | // Should return length of contract registered by schainHash. / | function getContractRegisteredLength(bytes32 schainHash) external view override returns (uint256) {
return _getRegistryContracts()[schainHash].length();
}
| function getContractRegisteredLength(bytes32 schainHash) external view override returns (uint256) {
return _getRegistryContracts()[schainHash].length();
}
| 13,838 |
84 | // Emits an {Approval} event. Requirements: - `owner` cannot be the zero address.- `spender` cannot be the zero address. / Present in ERC777 | function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
| function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
| 20,552 |
116 | // Set the ilk Clipper in the Dog | setContract(_dog, _ilk, "clip", _clip);
| setContract(_dog, _ilk, "clip", _clip);
| 24,816 |
53 | // Returns a users boosted emission share/_pid The index of the pool. See `poolInfo`/_user The address of the depositor/`userBoost` is scaled by 1e3/ return userBoost A multiplier for a users liquidity | function getUserBoost(uint256 _pid, address _user) public view returns (uint256 userBoost) {
PoolInfo memory pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_user];
userBoost = 1000;
if (user.veJoeBalance != 0 && pool.totalVeJoe != 0) {
userBoost = userBoost.add(user.veJoeBalance.mul(maxBoostFactor).div(pool.totalVeJoe));
}
}
| function getUserBoost(uint256 _pid, address _user) public view returns (uint256 userBoost) {
PoolInfo memory pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_user];
userBoost = 1000;
if (user.veJoeBalance != 0 && pool.totalVeJoe != 0) {
userBoost = userBoost.add(user.veJoeBalance.mul(maxBoostFactor).div(pool.totalVeJoe));
}
}
| 14,496 |
0 | // Variables / | bool internal _paused;
uint256 internal _tokenMaxSupply;
uint256 internal _tokenPrice;
uint256 internal _tokenMaxPerTxn;
uint256[] internal _tokenIdTracker;
| bool internal _paused;
uint256 internal _tokenMaxSupply;
uint256 internal _tokenPrice;
uint256 internal _tokenMaxPerTxn;
uint256[] internal _tokenIdTracker;
| 37,190 |
163 | // Set the address of the contract that represents ERC20 Gold. | function setGoldContract(address _contractAddress)
onlyOwner
public
| function setGoldContract(address _contractAddress)
onlyOwner
public
| 57,833 |
195 | // Swaps total/divisor of supply in taxes for ETH. Only executable by the tax holder. Also sends them./divisor the divisor to divide supply by. 200 is .5%, 1000 is .1%. | function manualSwap(uint256 divisor) external taxHolderOnly {
| function manualSwap(uint256 divisor) external taxHolderOnly {
| 22,436 |
27 | // Returns `true` if `account` has been granted `role` in `tokenId`. / | function hasRoleOfTokenId(
bytes32 role,
uint256 tokenId,
address account
| function hasRoleOfTokenId(
bytes32 role,
uint256 tokenId,
address account
| 5,323 |
25 | // Fallback function to receive Ether | receive() external payable {}
// Function to unpause the contract
function unpause() external onlyOwner {
lastUnpausedAt = block.timestamp;
_unpause();
}
| receive() external payable {}
// Function to unpause the contract
function unpause() external onlyOwner {
lastUnpausedAt = block.timestamp;
_unpause();
}
| 2,708 |
153 | // only owner | function setRevealed(bool _state) public onlyOwner {
revealed = _state;
}
| function setRevealed(bool _state) public onlyOwner {
revealed = _state;
}
| 16,623 |
93 | // Godfather can claim contract 48 hrs after card is purchased | function anOfferWeCantRefuse() public {
require(msg.sender==mobsterIndexToOwner[0]); // owner of Godfather
require(now > mobsters[0].buyTime + 48 hours); // 48 hours after purchase
ceoAddress = msg.sender; // now owner of contract
cooAddress = msg.sender; // entitled to withdraw any new contract fees
}
| function anOfferWeCantRefuse() public {
require(msg.sender==mobsterIndexToOwner[0]); // owner of Godfather
require(now > mobsters[0].buyTime + 48 hours); // 48 hours after purchase
ceoAddress = msg.sender; // now owner of contract
cooAddress = msg.sender; // entitled to withdraw any new contract fees
}
| 42,868 |
138 | // Check if msg.sender is swap pair root contract / | modifier onlySwapPairRoot() {
require(
msg.sender == swapPairRootContract,
SwapPairErrors.CALLER_IS_NOT_SWAP_PAIR_ROOT
);
_;
}
| modifier onlySwapPairRoot() {
require(
msg.sender == swapPairRootContract,
SwapPairErrors.CALLER_IS_NOT_SWAP_PAIR_ROOT
);
_;
}
| 1,308 |
13 | // EVENTS | event SummonComplete(
address indexed summoner,
address[] tokens,
uint256 summoningTime,
uint256 periodDuration,
uint256 votingPeriodLength,
uint256 gracePeriodLength,
uint256 proposalDeposit,
uint256 dilutionBound,
uint256 processingReward
| event SummonComplete(
address indexed summoner,
address[] tokens,
uint256 summoningTime,
uint256 periodDuration,
uint256 votingPeriodLength,
uint256 gracePeriodLength,
uint256 proposalDeposit,
uint256 dilutionBound,
uint256 processingReward
| 8,673 |
235 | // Removing liquidity from Curve Hop Pool | uint256 hopLpBalance = _hopLpBalance();
if (hopLpBalance > 0) {
curveHopPool.remove_liquidity_one_coin(
hopLpBalance,
int128(uint128(curveHopIndex)),
_minUnderlyingAccepted(hopLpBalance)
);
}
| uint256 hopLpBalance = _hopLpBalance();
if (hopLpBalance > 0) {
curveHopPool.remove_liquidity_one_coin(
hopLpBalance,
int128(uint128(curveHopIndex)),
_minUnderlyingAccepted(hopLpBalance)
);
}
| 33,554 |
207 | // Iterate through every specified item to cancel offers on items. | uint256 returnedOfferAmount = 0;
for (uint256 i = 0; i < _itemGroupIds.length; i++) {
uint256 groupId = _itemGroupIds[i];
uint256 offeredValue = offers[groupId][msg.sender];
returnedOfferAmount = returnedOfferAmount.add(offeredValue);
offers[groupId][msg.sender] = 0;
}
| uint256 returnedOfferAmount = 0;
for (uint256 i = 0; i < _itemGroupIds.length; i++) {
uint256 groupId = _itemGroupIds[i];
uint256 offeredValue = offers[groupId][msg.sender];
returnedOfferAmount = returnedOfferAmount.add(offeredValue);
offers[groupId][msg.sender] = 0;
}
| 46,435 |
30 | // ensure that the target is chronologically at or after the oldest observation | require(lte(time, beforeOrAt.blockTimestamp, target), 'OLD');
| require(lte(time, beforeOrAt.blockTimestamp, target), 'OLD');
| 26,604 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.