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
58
// Checks if contributor is whitelisted (main Whitelistable function)/contributor Address of who was whitelisted/contributionLimit Limit for the user contribution/currentSaleCap Cap of contributions to the sale at the current point in time/v Recovery id/r Component of the ECDSA signature/s Component of the ECDSA signature/ return Is the signature correct?
function checkWhitelisted( address contributor, uint256 contributionLimit, uint256 currentSaleCap, uint8 v, bytes32 r, bytes32 s
function checkWhitelisted( address contributor, uint256 contributionLimit, uint256 currentSaleCap, uint8 v, bytes32 r, bytes32 s
15,951
23
// ---------------------------------------------------------------------------- Basic version of ERC20 Standardsee https:github.com/ethereum/EIPs/issues/20 ----------------------------------------------------------------------------
contract LaoShiJiu is ERC20Interface, Owned { using SafeMath for uint; // ---------------------------------------------------------------------------- // This area is executed once in the initial stage with Constructor. // ---------------------------------------------------------------------------- string public constant symbol = "LSJ"; string public constant name = "Lao Shi Jiu"; uint8 public constant decimals = 6; string public constant features = "Delivery voucher, consumption reward converted shares voucher, employees performance reward converted shares voucher."; string public constant website = "http://www.laoshijiu.com"; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor() public { _totalSupply = 25000000 * 10**uint(decimals); balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } // ------------------------------------------------------------------------ // Get the token balance for account. // @param tokenOwner. The address from which the balance will be retrieved. // @return The balance of tokenOwner. // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // 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 // Implements ERC 20 Token standard:https://github.com/ethereum/EIPs/issues/20 // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom `tokens` // from the token owner's account. // @param spender, The address which will spend the funds. // @param tokens, The amount of tokens to be spent. // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account. // The calling account must already have sufficient tokens approve // for spending from the `from` account. // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // @dev Function to check the amount of tokens that an owner allowed to a spender. // @param tokenOwner. The address which owns the funds. // @param spender. The address which will spend the funds. // @param remaining, specifying the amount of tokens still available for the spender. // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; } // ------------------------------------------------------------------------ // Don't accept ETH. // ------------------------------------------------------------------------ function () external payable { revert(); } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); } }
contract LaoShiJiu is ERC20Interface, Owned { using SafeMath for uint; // ---------------------------------------------------------------------------- // This area is executed once in the initial stage with Constructor. // ---------------------------------------------------------------------------- string public constant symbol = "LSJ"; string public constant name = "Lao Shi Jiu"; uint8 public constant decimals = 6; string public constant features = "Delivery voucher, consumption reward converted shares voucher, employees performance reward converted shares voucher."; string public constant website = "http://www.laoshijiu.com"; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor() public { _totalSupply = 25000000 * 10**uint(decimals); balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } // ------------------------------------------------------------------------ // Get the token balance for account. // @param tokenOwner. The address from which the balance will be retrieved. // @return The balance of tokenOwner. // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; } // ------------------------------------------------------------------------ // 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 // Implements ERC 20 Token standard:https://github.com/ethereum/EIPs/issues/20 // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom `tokens` // from the token owner's account. // @param spender, The address which will spend the funds. // @param tokens, The amount of tokens to be spent. // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account. // The calling account must already have sufficient tokens approve // for spending from the `from` account. // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } // ------------------------------------------------------------------------ // @dev Function to check the amount of tokens that an owner allowed to a spender. // @param tokenOwner. The address which owns the funds. // @param spender. The address which will spend the funds. // @param remaining, specifying the amount of tokens still available for the spender. // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; } // ------------------------------------------------------------------------ // Don't accept ETH. // ------------------------------------------------------------------------ function () external payable { revert(); } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); } }
33,478
108
// Contract constructor/TOKEN_ADDR_ `ERC20APHRA` token address/GOVERNANCE_ `GOVERNANCE`address/AUTHORITY_ `Authority`address
constructor( address TOKEN_ADDR_, address GOVERNANCE_, address AUTHORITY_
constructor( address TOKEN_ADDR_, address GOVERNANCE_, address AUTHORITY_
72,111
131
// only locker can add vesting lock /
function addVestingLock( address account, uint256 startsAt, uint256 period, uint256 count
function addVestingLock( address account, uint256 startsAt, uint256 period, uint256 count
52,815
4
// The name of this contract
string public constant name = "Proxima Pair Governor";
string public constant name = "Proxima Pair Governor";
35,645
114
// The ABlock token!
IERC20 public aBlock;
IERC20 public aBlock;
11,546
99
// This marks the removal of an amount of liquidity tokens
state.portfolioChanges[state.indexCount] = Common.Asset( asset.cashGroupId, asset.instrumentId, asset.maturity, Common.makeCounterparty(Common.getLiquidityToken()), asset.rate, tokens ); state.indexCount++;
state.portfolioChanges[state.indexCount] = Common.Asset( asset.cashGroupId, asset.instrumentId, asset.maturity, Common.makeCounterparty(Common.getLiquidityToken()), asset.rate, tokens ); state.indexCount++;
32,775
18
// Computes the winning proposal taking all previous votes into account.return winningProposal_ index of winning proposal in the proposals array /
function winningProposal() public view returns (uint winningProposal_)
function winningProposal() public view returns (uint winningProposal_)
23,272
240
// cannot use the same market
if (heldMarket == owedMarket) { continue; }
if (heldMarket == owedMarket) { continue; }
33,215
38
// Update partner 2 vows only once
function updatePartner2_vows(string _partner2_vows) public { require((msg.sender == owner || msg.sender == partner2_address) && (bytes(partner2_vows).length == 0)); partner2_vows = _partner2_vows; }
function updatePartner2_vows(string _partner2_vows) public { require((msg.sender == owner || msg.sender == partner2_address) && (bytes(partner2_vows).length == 0)); partner2_vows = _partner2_vows; }
50,430
8
// LLE completion flag
bool public eventCompleted;
bool public eventCompleted;
10,278
456
// Comptroller
TokenListenerInterface public tokenListener;
TokenListenerInterface public tokenListener;
27,472
569
// this is the address of the new DaoFundingManager contract ether funds will be moved from the current version's contract to this new contract
address public newDaoFundingManager;
address public newDaoFundingManager;
53,388
105
// Initiates a new rebase operation, provided the minimum time period has elapsed.The supply adjustment equals (_totalSupplyDeviationFromTargetRate) / rebaseLag Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate and targetRate is CpiOracleRate / baseCpi /
function rebase() external onlyOrchestrator
function rebase() external onlyOrchestrator
35,632
28
// Function to set default vesting schedule parameters. /
uint256 _step, bool _changeFreezed) public onlyAllocateAgent { // data validation require(_step != 0); require(_duration != 0); require(_cliff <= _duration); startAt = _startAt; cliff = _cliff; duration = _duration; step = _step; changeFreezed = _changeFreezed; }
uint256 _step, bool _changeFreezed) public onlyAllocateAgent { // data validation require(_step != 0); require(_duration != 0); require(_cliff <= _duration); startAt = _startAt; cliff = _cliff; duration = _duration; step = _step; changeFreezed = _changeFreezed; }
18,686
46
// _name = "Squid Yield Finance";_symbol = "SQFI";
_name = "Squid Yield Finance"; _symbol = "SQFI"; _decimals = 18; _totalSupply = 15000000000000000000000; _balances[creator()] = _totalSupply; emit Transfer(address(0), creator(), _totalSupply);
_name = "Squid Yield Finance"; _symbol = "SQFI"; _decimals = 18; _totalSupply = 15000000000000000000000; _balances[creator()] = _totalSupply; emit Transfer(address(0), creator(), _totalSupply);
21,425
540
// Update community standing
furballs.governance().updateMaxLevel(owner, level);
furballs.governance().updateMaxLevel(owner, level);
34,051
40
// Called by a delegate with signed hash to approve a transaction for user. All variables equivalent to transfer except _to: _to The address that will be approved to transfer GTCOIN from user's wallet./
{ uint256 gas = gasleft(); address from = recoverPreSigned(_signature, approveSig, _to, _value, "", _gasPrice, _nonce); require(from != address(0)); require(!invalidSignatures[from][_signature]); invalidSignatures[from][_signature] = true; nonces[from]++; require(_approve(from, _to, _value)); if (_gasPrice > 0) { gas = 35000 + gas.sub(gasleft()); require(_transfer(from, msg.sender, _gasPrice.mul(gas))); } emit SignatureRedeemed(_signature, from); return true; }
{ uint256 gas = gasleft(); address from = recoverPreSigned(_signature, approveSig, _to, _value, "", _gasPrice, _nonce); require(from != address(0)); require(!invalidSignatures[from][_signature]); invalidSignatures[from][_signature] = true; nonces[from]++; require(_approve(from, _to, _value)); if (_gasPrice > 0) { gas = 35000 + gas.sub(gasleft()); require(_transfer(from, msg.sender, _gasPrice.mul(gas))); } emit SignatureRedeemed(_signature, from); return true; }
467
9
// Returns the maximum amount of collateral available to withdraw/Due to rounding errors the result is - 1% wei from the exact amount/_cCollAddress Collateral we are getting the max value of/_account Users account/ return Returns the max. collateral amount in that token
function getMaxCollateral(address _cCollAddress, address _account) public returns (uint) { (, uint liquidityInEth, ) = ComptrollerInterface(COMPTROLLER).getAccountLiquidity(_account); uint usersBalance = CTokenInterface(_cCollAddress).balanceOfUnderlying(_account); address oracle = ComptrollerInterface(COMPTROLLER).oracle(); if (liquidityInEth == 0) return usersBalance; CTokenInterface(_cCollAddress).accrueInterest(); if (_cCollAddress == CETH_ADDRESS) { if (liquidityInEth > usersBalance) return usersBalance; return sub(liquidityInEth, (liquidityInEth / 100)); } uint ethPrice = CompoundOracleInterface(oracle).getUnderlyingPrice(_cCollAddress); uint liquidityInToken = wdiv(liquidityInEth, ethPrice); if (liquidityInToken > usersBalance) return usersBalance; return sub(liquidityInToken, (liquidityInToken / 100)); // cut off 1% due to rounding issues }
function getMaxCollateral(address _cCollAddress, address _account) public returns (uint) { (, uint liquidityInEth, ) = ComptrollerInterface(COMPTROLLER).getAccountLiquidity(_account); uint usersBalance = CTokenInterface(_cCollAddress).balanceOfUnderlying(_account); address oracle = ComptrollerInterface(COMPTROLLER).oracle(); if (liquidityInEth == 0) return usersBalance; CTokenInterface(_cCollAddress).accrueInterest(); if (_cCollAddress == CETH_ADDRESS) { if (liquidityInEth > usersBalance) return usersBalance; return sub(liquidityInEth, (liquidityInEth / 100)); } uint ethPrice = CompoundOracleInterface(oracle).getUnderlyingPrice(_cCollAddress); uint liquidityInToken = wdiv(liquidityInEth, ethPrice); if (liquidityInToken > usersBalance) return usersBalance; return sub(liquidityInToken, (liquidityInToken / 100)); // cut off 1% due to rounding issues }
11,985
4
// ADAPTED FROM https:docs.chain.link/docs/get-a-random-number
event RequestRandomness(address indexed user, bool selection, bytes32 requestId); event RequestRandomnessFulfilled(uint requestId, bool outcome); event WithdrawRequest(address user, uint amount); event RequestNotRandom(address user, uint amount, bool selection);
event RequestRandomness(address indexed user, bool selection, bytes32 requestId); event RequestRandomnessFulfilled(uint requestId, bool outcome); event WithdrawRequest(address user, uint amount); event RequestNotRandom(address user, uint amount, bool selection);
45,383
40
// Do task according to CallType
if (info.callType == FlashLoan.CallType.Switch) { IVault(info.vault).executeSwitch(info.newProvider, amount, fee); } else if (info.callType == FlashLoan.CallType.Close) {
if (info.callType == FlashLoan.CallType.Switch) { IVault(info.vault).executeSwitch(info.newProvider, amount, fee); } else if (info.callType == FlashLoan.CallType.Close) {
19,767
124
// Send ETH to marketing
uint256 marketingAmt = unitBalance * 2 * (buyFee.marketing + sellFee.marketing); if (marketingAmt > 0) { payable(_marketingAddress).transfer(marketingAmt); }
uint256 marketingAmt = unitBalance * 2 * (buyFee.marketing + sellFee.marketing); if (marketingAmt > 0) { payable(_marketingAddress).transfer(marketingAmt); }
23,641
34
// Wrappers over Solidity's arithmetic operations with added overflowchecks. Arithmetic operations in Solidity wrap on overflow. This can easily resultin bugs, because programmers usually assume that an overflow raises anerror, which is the standard behavior in high level programming languages.`SafeMath` restores this intuition by reverting the transaction when anoperation overflows. Using this library instead of the unchecked operations eliminates an entireclass of bugs, so it's recommended to use it always. /
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, 'SafeMath: addition overflow'); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, 'SafeMath: subtraction overflow'); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, 'SafeMath: multiplication overflow'); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, 'SafeMath: division by zero'); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, 'SafeMath: modulo by zero'); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, 'SafeMath: addition overflow'); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, 'SafeMath: subtraction overflow'); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, 'SafeMath: multiplication overflow'); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, 'SafeMath: division by zero'); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, 'SafeMath: modulo by zero'); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
51,707
187
// Delegate votes from `msg.sender` to `delegatee` delegatee The address to delegate votes to /
function delegate(address delegatee) public { if (delegatee == address(0)) delegatee = msg.sender; return _delegate(msg.sender, delegatee); }
function delegate(address delegatee) public { if (delegatee == address(0)) delegatee = msg.sender; return _delegate(msg.sender, delegatee); }
21,815
55
// These can be changed before ICO start ($7USD/MNTP)
uint constant STD_PRICE_USD_PER_1000_TOKENS = 7000;
uint constant STD_PRICE_USD_PER_1000_TOKENS = 7000;
5,665
0
// Emitted when a new exchange proposal is created.
event ExchangeProposalCreated( uint256 indexed proposalId, address indexed exchanger, string stableTokenRegistryId, uint256 sellAmount, uint256 buyAmount, bool sellCelo );
event ExchangeProposalCreated( uint256 indexed proposalId, address indexed exchanger, string stableTokenRegistryId, uint256 sellAmount, uint256 buyAmount, bool sellCelo );
24,573
1
// _emission how many tokens will be released _decimals decimals Tokens /
function setInfo(uint _emission, uint _decimals) external onlyOwner { emission = _emission; decimals = _decimals; }
function setInfo(uint _emission, uint _decimals) external onlyOwner { emission = _emission; decimals = _decimals; }
10,119
65
// Transfer the ETH and store if it succeeded or not.
success := call(gas(), to, amount, 0, 0, 0, 0)
success := call(gas(), to, amount, 0, 0, 0, 0)
6,814
100
// (3) retrieve return data
returndatacopy(ptr, 0, size)
returndatacopy(ptr, 0, size)
57,841
114
// admin function to send MVT to external address, for emergency use
function sendMVT(address _to, uint _amount) public onlyOwner{ MVTToken.transfer(_to, _amount); }
function sendMVT(address _to, uint _amount) public onlyOwner{ MVTToken.transfer(_to, _amount); }
51,950
11
// see: https:github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/BasicToken.sol
using SafeMath for uint256;
using SafeMath for uint256;
7,666
1
// status for campaign mint state
address private constant EMPTY = address(0); address private constant CAN_MINT = address(1); address private constant DISABLED = address(2); using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds;
address private constant EMPTY = address(0); address private constant CAN_MINT = address(1); address private constant DISABLED = address(2); using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds;
31,223
101
// We want to avoid creating a proxy for a contract address that might not be able to handle proxies, then losing the SAFE
require(csize == 0, "dst-is-a-contract");
require(csize == 0, "dst-is-a-contract");
54,799
10
// Internal function that sets owner of the smart contract. Only used on initialisation. /
function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
34,134
22
// Multiplies two numbers, throws on overflow. _a Factor number. _b Factor number. /
function mul( uint256 _a, uint256 _b ) internal pure returns (uint256)
function mul( uint256 _a, uint256 _b ) internal pure returns (uint256)
20,065
8
// Returns the subtraction of two unsigned integers, reverting with custom message onoverflow (when the result is negative). Counterpart to Solidity's `-` operator. Requirements:- Subtraction cannot overflow. _Available since v2.4.0._ /
function sub( uint256 a, uint256 b, string memory errorMessage
function sub( uint256 a, uint256 b, string memory errorMessage
1,854
20
// Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), reverting when dividing by zero. Counterpart to Solidity's `%` operator. This function uses a `revert` opcode (which leaves remaining gas untouched) while Solidity uses an invalid opcode to revert (consuming all remaining gas). Requirements: - The divisor cannot be zero./
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
551
246
// calculate the reward for token for the interval: [`start`, `end`)/ provided for on-going operational queries
function calculateIntervalReward(uint start, uint end, uint index) public view returns (uint) { uint balance = tokens[index] == ETH ? address(this).balance : LegacyToken(tokens[index]).balanceOf(address(this)); return balance.sub(toBeDistributed[index]).mul(end.sub(start)).div(block.number.sub(start)); }
function calculateIntervalReward(uint start, uint end, uint index) public view returns (uint) { uint balance = tokens[index] == ETH ? address(this).balance : LegacyToken(tokens[index]).balanceOf(address(this)); return balance.sub(toBeDistributed[index]).mul(end.sub(start)).div(block.number.sub(start)); }
24,431
68
// Transfer token to a specified address and forward the data to recipient ERC-677 standard_toReceiver address._value Amount of tokens that will be transferred._dataTransaction metadata. We add ability to track the initial sender so we pass that to determine the bond holder/
function transferAndCallExpanded(address _to, uint256 _value, bytes _data, address _sender, address _referrer) external returns (bool) { require(_to != address(0)); require(canAcceptTokens_[_to] == true); // security check that contract approved by Wall Street Exchange platform require(transfer(_to, _value)); // do a normal token transfer to the contract if (isContract(_to)) { AcceptsExchange receiver = AcceptsExchange(_to); require(receiver.tokenFallbackExpanded(msg.sender, _value, _data, msg.sender, _referrer)); } return true; }
function transferAndCallExpanded(address _to, uint256 _value, bytes _data, address _sender, address _referrer) external returns (bool) { require(_to != address(0)); require(canAcceptTokens_[_to] == true); // security check that contract approved by Wall Street Exchange platform require(transfer(_to, _value)); // do a normal token transfer to the contract if (isContract(_to)) { AcceptsExchange receiver = AcceptsExchange(_to); require(receiver.tokenFallbackExpanded(msg.sender, _value, _data, msg.sender, _referrer)); } return true; }
3,416
2
// address of the Sushiswap Router contract
IUniswapV2Router public immutable sushiRouter;
IUniswapV2Router public immutable sushiRouter;
26,282
5
// Events:
event AirdropTransaction(address receipient, uint256 amount, uint256 date); constructor( address _admin, address _tokenToAirdrop, uint256 _deadlineDuration
event AirdropTransaction(address receipient, uint256 amount, uint256 date); constructor( address _admin, address _tokenToAirdrop, uint256 _deadlineDuration
43,169
16
// this code shouldn't be necessary, but when it's removed the gas estimation methods in the gnosis safe no longer work, still true as of solidity 7.1
return super.transfer(dst, wad);
return super.transfer(dst, wad);
21,508
5
// Claim price
uint256 public claimPrice;
uint256 public claimPrice;
75,427
125
// the array of reward tokens to send to
ERC20[] public rewardTokens; constructor( address _rewardDestination, ERC20[] memory _rewardTokens
ERC20[] public rewardTokens; constructor( address _rewardDestination, ERC20[] memory _rewardTokens
5,520
3
// NOTE: restricting access to owner only. See {BEP20Mintable-finishMinting}. /
function _finishMinting() internal override onlyOwner { super._finishMinting(); }
function _finishMinting() internal override onlyOwner { super._finishMinting(); }
15,717
19
// Trade ETH to ERC20
function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable returns (uint256 tokens_bought); function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256 eth_sold); function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable returns (uint256 eth_sold);
function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable returns (uint256 tokens_bought); function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256 eth_sold); function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable returns (uint256 eth_sold);
1,352
16
// Extract the function signature from the userOp calldata and check whether the signer is attempting to call `execute` or `executeBatch`.
bytes4 sig = getFunctionSignature(_userOp.callData); if (sig == this.execute.selector) {
bytes4 sig = getFunctionSignature(_userOp.callData); if (sig == this.execute.selector) {
19,146
80
// returns the number of converter anchors in the registry return number of anchors /
function getAnchorCount() public view override returns (uint256) { return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getSmartTokenCount(); }
function getAnchorCount() public view override returns (uint256) { return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getSmartTokenCount(); }
36,886
3
// 1. Find out what farming token we are dealing with and min additional LP tokens.
uint256 minLPAmount = abi.decode(data, (uint256)); IWorker worker = IWorker(msg.sender); address baseToken = worker.baseToken(); address farmingToken = worker.farmingToken(); IPancakePair lpToken = IPancakePair(factory.getPair(farmingToken, baseToken));
uint256 minLPAmount = abi.decode(data, (uint256)); IWorker worker = IWorker(msg.sender); address baseToken = worker.baseToken(); address farmingToken = worker.farmingToken(); IPancakePair lpToken = IPancakePair(factory.getPair(farmingToken, baseToken));
13,625
6
// KYC constructor
function KYC(address _admin) public { owner = msg.sender; admin = _admin; }
function KYC(address _admin) public { owner = msg.sender; admin = _admin; }
44,723
90
// using a static call to get the return from older converters
function getReturn(IConverter _dest, IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) internal view returns (uint256, uint256) { bytes memory data = abi.encodeWithSelector(GET_RETURN_FUNC_SELECTOR, _sourceToken, _targetToken, _amount); (bool success, bytes memory returnData) = address(_dest).staticcall(data); if (success) { if (returnData.length == 64) { return abi.decode(returnData, (uint256, uint256)); } if (returnData.length == 32) { return (abi.decode(returnData, (uint256)), 0); } } return (0, 0); }
function getReturn(IConverter _dest, IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) internal view returns (uint256, uint256) { bytes memory data = abi.encodeWithSelector(GET_RETURN_FUNC_SELECTOR, _sourceToken, _targetToken, _amount); (bool success, bytes memory returnData) = address(_dest).staticcall(data); if (success) { if (returnData.length == 64) { return abi.decode(returnData, (uint256, uint256)); } if (returnData.length == 32) { return (abi.decode(returnData, (uint256)), 0); } } return (0, 0); }
14,907
11
// deploy new child token
bytes32 salt = keccak256(abi.encodePacked(rootToken)); childToken = createClone(salt, tokenTemplate); IFxERC20(childToken).initialize( address(this), rootToken, string(abi.encodePacked(name, SUFFIX_NAME)), string(abi.encodePacked(PREFIX_SYMBOL, symbol)), decimals );
bytes32 salt = keccak256(abi.encodePacked(rootToken)); childToken = createClone(salt, tokenTemplate); IFxERC20(childToken).initialize( address(this), rootToken, string(abi.encodePacked(name, SUFFIX_NAME)), string(abi.encodePacked(PREFIX_SYMBOL, symbol)), decimals );
16,117
54
// Adds or removes dynamic support for an interface. Can be used in 3 ways:/ - Add a contract "delegate" that implements a single function/ - Remove delegate for a function/ - Specify that an interface ID is "supported", without adding a delegate. This is/ used for composite interfaces when the interface ID is not a single method ID./Must be called through `invoke`/_interfaceId The ID of the interface we are adding support for/_delegate Either:/- the address of a contract that implements the function specified by `_interfaceId`/for adding an implementation for a single function/- 0 for removing an existing delegate/- COMPOSITE_PLACEHOLDER for
function setDelegate(bytes4 _interfaceId, address _delegate) external onlyInvoked { delegates[_interfaceId] = _delegate; emit DelegateUpdated(_interfaceId, _delegate); }
function setDelegate(bytes4 _interfaceId, address _delegate) external onlyInvoked { delegates[_interfaceId] = _delegate; emit DelegateUpdated(_interfaceId, _delegate); }
20,074
2
// Accessory N°3 => Bow Tie
function item_3() public pure returns (string memory) { return base( string( abi.encodePacked( '<path fill="none" stroke="#000000" stroke-width="7" stroke-miterlimit="10" d="M176.2,312.5 c3.8,0.3,26.6,7.2,81.4-0.4"/>', '<path fill-rule="evenodd" clip-rule="evenodd" fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M211.3,322.1 c-2.5-0.3-5-0.5-7.4,0c-1.1,0-1.9-1.4-1.9-3.1v-4.5c0-1.7,0.9-3.1,1.9-3.1c2.3,0.6,4.8,0.5,7.4,0c1.1,0,1.9,1.4,1.9,3.1v4.5 C213.2,320.6,212.3,322.1,211.3,322.1z"/>', '<path fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M202.4,321.5c0,0-14,5.6-17.7,5.3c-1.1-0.1-2.5-4.6-1.2-10.5 c0,0-1-2.2-0.3-9.5c0.4-3.4,19.2,5.1,19.2,5.1S201,316.9,202.4,321.5z"/>', '<path fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M212.6,321.5c0,0,14,5.6,17.7,5.3c1.1-0.1,2.5-4.6,1.2-10.5 c0,0,1-2.2,0.3-9.5c-0.4-3.4-19.2,5.1-19.2,5.1S213.9,316.9,212.6,321.5z"/>', '<path opacity="0.41" d="M213.6,315.9l6.4-1.1l-3.6,1.9l4.1,1.1l-7-0.6L213.6,315.9z M201.4,316.2l-6.4-1.1l3.6,1.9l-4.1,1.1l7-0.6L201.4,316.2z"/>' ) ) ); }
function item_3() public pure returns (string memory) { return base( string( abi.encodePacked( '<path fill="none" stroke="#000000" stroke-width="7" stroke-miterlimit="10" d="M176.2,312.5 c3.8,0.3,26.6,7.2,81.4-0.4"/>', '<path fill-rule="evenodd" clip-rule="evenodd" fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M211.3,322.1 c-2.5-0.3-5-0.5-7.4,0c-1.1,0-1.9-1.4-1.9-3.1v-4.5c0-1.7,0.9-3.1,1.9-3.1c2.3,0.6,4.8,0.5,7.4,0c1.1,0,1.9,1.4,1.9,3.1v4.5 C213.2,320.6,212.3,322.1,211.3,322.1z"/>', '<path fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M202.4,321.5c0,0-14,5.6-17.7,5.3c-1.1-0.1-2.5-4.6-1.2-10.5 c0,0-1-2.2-0.3-9.5c0.4-3.4,19.2,5.1,19.2,5.1S201,316.9,202.4,321.5z"/>', '<path fill="#DF0849" stroke="#000000" stroke-miterlimit="10" d="M212.6,321.5c0,0,14,5.6,17.7,5.3c1.1-0.1,2.5-4.6,1.2-10.5 c0,0,1-2.2,0.3-9.5c-0.4-3.4-19.2,5.1-19.2,5.1S213.9,316.9,212.6,321.5z"/>', '<path opacity="0.41" d="M213.6,315.9l6.4-1.1l-3.6,1.9l4.1,1.1l-7-0.6L213.6,315.9z M201.4,316.2l-6.4-1.1l3.6,1.9l-4.1,1.1l7-0.6L201.4,316.2z"/>' ) ) ); }
167
215
// Balance of want currently held in strategy positions
function balanceOfPool() public virtual view returns (uint256); uint256[49] private __gap;
function balanceOfPool() public virtual view returns (uint256); uint256[49] private __gap;
17,645
122
// event triggered when tokens are withdrawn
event Withdrawn();
event Withdrawn();
13,786
14
// A base contract to control ownership/cuilichen
contract OwnerBase { // The addresses of the accounts that can execute actions within each roles. address public ceoAddress; address public cfoAddress; address public cooAddress; // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked bool public paused = false; /// constructor function OwnerBase() public { ceoAddress = msg.sender; cfoAddress = msg.sender; cooAddress = msg.sender; } /// @dev Access modifier for CEO-only functionality modifier onlyCEO() { require(msg.sender == ceoAddress); _; } /// @dev Access modifier for CFO-only functionality modifier onlyCFO() { require(msg.sender == cfoAddress); _; } /// @dev Access modifier for COO-only functionality modifier onlyCOO() { require(msg.sender == cooAddress); _; } /// @dev Assigns a new address to act as the CEO. Only available to the current CEO. /// @param _newCEO The address of the new CEO function setCEO(address _newCEO) external onlyCEO { require(_newCEO != address(0)); ceoAddress = _newCEO; } /// @dev Assigns a new address to act as the COO. Only available to the current CEO. /// @param _newCFO The address of the new COO function setCFO(address _newCFO) external onlyCEO { require(_newCFO != address(0)); cfoAddress = _newCFO; } /// @dev Assigns a new address to act as the COO. Only available to the current CEO. /// @param _newCOO The address of the new COO function setCOO(address _newCOO) external onlyCEO { require(_newCOO != address(0)); cooAddress = _newCOO; } /// @dev Modifier to allow actions only when the contract IS NOT paused modifier whenNotPaused() { require(!paused); _; } /// @dev Modifier to allow actions only when the contract IS paused modifier whenPaused { require(paused); _; } /// @dev Called by any "C-level" role to pause the contract. Used only when /// a bug or exploit is detected and we need to limit damage. function pause() external onlyCOO whenNotPaused { paused = true; } /// @dev Unpauses the smart contract. Can only be called by the CEO, since /// one reason we may pause the contract is when CFO or COO accounts are /// compromised. /// @notice This is public rather than external so it can be called by /// derived contracts. function unpause() public onlyCOO whenPaused { // can't unpause if contract was upgraded paused = false; } }
contract OwnerBase { // The addresses of the accounts that can execute actions within each roles. address public ceoAddress; address public cfoAddress; address public cooAddress; // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked bool public paused = false; /// constructor function OwnerBase() public { ceoAddress = msg.sender; cfoAddress = msg.sender; cooAddress = msg.sender; } /// @dev Access modifier for CEO-only functionality modifier onlyCEO() { require(msg.sender == ceoAddress); _; } /// @dev Access modifier for CFO-only functionality modifier onlyCFO() { require(msg.sender == cfoAddress); _; } /// @dev Access modifier for COO-only functionality modifier onlyCOO() { require(msg.sender == cooAddress); _; } /// @dev Assigns a new address to act as the CEO. Only available to the current CEO. /// @param _newCEO The address of the new CEO function setCEO(address _newCEO) external onlyCEO { require(_newCEO != address(0)); ceoAddress = _newCEO; } /// @dev Assigns a new address to act as the COO. Only available to the current CEO. /// @param _newCFO The address of the new COO function setCFO(address _newCFO) external onlyCEO { require(_newCFO != address(0)); cfoAddress = _newCFO; } /// @dev Assigns a new address to act as the COO. Only available to the current CEO. /// @param _newCOO The address of the new COO function setCOO(address _newCOO) external onlyCEO { require(_newCOO != address(0)); cooAddress = _newCOO; } /// @dev Modifier to allow actions only when the contract IS NOT paused modifier whenNotPaused() { require(!paused); _; } /// @dev Modifier to allow actions only when the contract IS paused modifier whenPaused { require(paused); _; } /// @dev Called by any "C-level" role to pause the contract. Used only when /// a bug or exploit is detected and we need to limit damage. function pause() external onlyCOO whenNotPaused { paused = true; } /// @dev Unpauses the smart contract. Can only be called by the CEO, since /// one reason we may pause the contract is when CFO or COO accounts are /// compromised. /// @notice This is public rather than external so it can be called by /// derived contracts. function unpause() public onlyCOO whenPaused { // can't unpause if contract was upgraded paused = false; } }
49,170
27
// function to set penalty percent
function setPenaltyPercent(uint256 silver, uint256 gold, uint256 platinum) external onlyOwner returns(bool){ require(silver != 0 && gold != 0 && platinum !=0,"Invalid Penalty Value or Zero value, Please Try Again!!!"); TOKEN_PENALTY_PERCENT_SILVER = silver; TOKEN_PENALTY_PERCENT_GOLD = gold; TOKEN_PENALTY_PERCENT_PLATINUM = platinum; return true; }
function setPenaltyPercent(uint256 silver, uint256 gold, uint256 platinum) external onlyOwner returns(bool){ require(silver != 0 && gold != 0 && platinum !=0,"Invalid Penalty Value or Zero value, Please Try Again!!!"); TOKEN_PENALTY_PERCENT_SILVER = silver; TOKEN_PENALTY_PERCENT_GOLD = gold; TOKEN_PENALTY_PERCENT_PLATINUM = platinum; return true; }
33,493
12
// Returns uint256 time delay in seconds for a vault _vault - The target vault.return uint256 time delay in seconds for a vault. /
function getTimeDelay(address _vault) external view returns (uint256);
function getTimeDelay(address _vault) external view returns (uint256);
35,727
5
// Max sub account id that could be bound to account id
uint8 internal constant MAX_SUB_ACCOUNT_ID = 31;
uint8 internal constant MAX_SUB_ACCOUNT_ID = 31;
28,720
8
// record block number and invested amount (msg.value) of this transaction
atBlock[msg.sender] = block.number; invested[msg.sender] += msg.value; balance += msg.value;
atBlock[msg.sender] = block.number; invested[msg.sender] += msg.value; balance += msg.value;
962
13
// Decreases the operator share for the given pool (i.e. increases pool rewards for members)./poolId Unique Id of pool./newOperatorShare The newly decreased percentage of any rewards owned by the operator.
function decreaseStakingPoolOperatorShare(bytes32 poolId, uint32 newOperatorShare) external override onlyStakingPoolOperator(poolId)
function decreaseStakingPoolOperatorShare(bytes32 poolId, uint32 newOperatorShare) external override onlyStakingPoolOperator(poolId)
25,041
55
// Update total staking amount
totalStaking[tokenAddress] = totalStaking[tokenAddress].add(amount); userTotalStaking[msg.sender][tokenAddress] = userTotalStaking[msg.sender][tokenAddress].add(amount);
totalStaking[tokenAddress] = totalStaking[tokenAddress].add(amount); userTotalStaking[msg.sender][tokenAddress] = userTotalStaking[msg.sender][tokenAddress].add(amount);
39,477
14
// safety check since funds don't get transferred to a extrnal protocol
if (_amount > _balance) { _amount = _balance; }
if (_amount > _balance) { _amount = _balance; }
25,208
144
// apply amount
uint[3] memory weiAmountBoundaries = [uint(10000000000000000000),uint(10000000000000000000),uint(1000000000000000000)]; uint[3] memory weiAmountRates = [uint(250),uint(0),uint(50)]; for (uint j = 0; j < 3; j++) { if (weiAmount >= weiAmountBoundaries[j]) { bonusRate += bonusRate * weiAmountRates[j] / 1000; break; }
uint[3] memory weiAmountBoundaries = [uint(10000000000000000000),uint(10000000000000000000),uint(1000000000000000000)]; uint[3] memory weiAmountRates = [uint(250),uint(0),uint(50)]; for (uint j = 0; j < 3; j++) { if (weiAmount >= weiAmountBoundaries[j]) { bonusRate += bonusRate * weiAmountRates[j] / 1000; break; }
32,405
7
// If the delegate did not vote yet, add to her weight.
delegate_.weight += sender.weight;
delegate_.weight += sender.weight;
4,312
7
// Returns the number of the proposals. /
function proposalsLengthOf( uint256 ballotNum ) public view virtual returns ( uint256 length_ );
function proposalsLengthOf( uint256 ballotNum ) public view virtual returns ( uint256 length_ );
47,489
64
// must have an amount specified
require(tokenAmount >= 0, "NO_PAYMENT_INCLUDED");
require(tokenAmount >= 0, "NO_PAYMENT_INCLUDED");
46,833
34
// Check extracted storage root is matching with existing stored storage root
require(provenStorageRoot == storageRoot, "Storage root mismatch when account is already proven");
require(provenStorageRoot == storageRoot, "Storage root mismatch when account is already proven");
18,734
1
// Fired when the owner to renounce ownership, leaving no one/as the owner./previousOwner The previous `owner` of this contract
event OwnershipRenounced(address indexed previousOwner);
event OwnershipRenounced(address indexed previousOwner);
22,615
16
// return The balance of the contract
function protocolBalance() public view returns (uint) { return address(this).balance; }
function protocolBalance() public view returns (uint) { return address(this).balance; }
4,959
36
// Set a new PremiaReferral contract/_premiaReferral The new PremiaReferral Contract
function setPremiaReferral(IPremiaReferral _premiaReferral) external onlyOwner { premiaReferral = _premiaReferral; }
function setPremiaReferral(IPremiaReferral _premiaReferral) external onlyOwner { premiaReferral = _premiaReferral; }
37,932
40
// current recipient status should be Paused
require(recipients[recipient].recipientVestingStatus == Status.Paused, "unPauseRecipient: cannot unpause");
require(recipients[recipient].recipientVestingStatus == Status.Paused, "unPauseRecipient: cannot unpause");
8,106
27
// Calcels recurring billing with id {billingId} if it is owned by a transaction signer.
function cancelRecurringBilling (uint256 billingId) public isCustomer(billingId) { cancelRecurringBillingInternal(billingId); }
function cancelRecurringBilling (uint256 billingId) public isCustomer(billingId) { cancelRecurringBillingInternal(billingId); }
85,185
13
// if no bet was placed (cancelActiveGame) set new balance to 0
int newBalance = 0;
int newBalance = 0;
42,475
336
// The LIP-36 earnings claiming algorithm uses the cumulative factors from the delegator's lastClaimRound i.e. startRound - 1 and from the specified _endRound We only need to execute this algorithm if the end round >= lip36Round
if (_endRound >= lip36Round) {
if (_endRound >= lip36Round) {
23,752
54
// update his new commited balance to zero in jury Registry contract
committedBalance[user] = 0;
committedBalance[user] = 0;
28,157
25
// Returns amount of created canvases./
function getCanvasCount() public view returns (uint) { return canvases.length; }
function getCanvasCount() public view returns (uint) { return canvases.length; }
4,616
22
// Convert signed 64.64 fixed point number into signed 64-bit integer numberrounding down.x signed 64.64-bit fixed point numberreturn signed 64-bit integer number /
function toInt (int128 x) internal pure returns (int64) { unchecked { return int64 (x >> 64); } }
function toInt (int128 x) internal pure returns (int64) { unchecked { return int64 (x >> 64); } }
26,566
133
// TokenMarket /Ville Sundell <ville at tokenmarket.net> /
contract CheckpointToken is ERC677Token { using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing) string public name; string public symbol; uint256 public decimals; SecurityTransferAgent public transferVerifier; struct Checkpoint { uint256 blockNumber; uint256 value; } mapping (address => Checkpoint[]) public tokenBalances; Checkpoint[] public tokensTotal; mapping (address => mapping (address => uint256)) public allowed; /** * @dev Constructor for CheckpointToken, initializing the token * * Here we define initial values for name, symbol and decimals. * * @param _name Initial name of the token * @param _symbol Initial symbol of the token * @param _decimals Number of decimals for the token, industry standard is 18 */ function CheckpointToken(string _name, string _symbol, uint256 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } /** PUBLIC FUNCTIONS ****************************************/ /** * @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. */ function allowance(address owner, address spender) public view returns (uint256) { return allowed[owner][spender]; } /** * @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 * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return true if the call function was executed successfully */ function approve(address spender, uint256 value) public returns (bool) { allowed[msg.sender][spender] = value; Approval(msg.sender, spender, value); return true; } /** * @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 * @return true if the call function was executed successfully */ function transferFrom(address from, address to, uint256 value) public returns (bool) { require(value <= allowed[from][msg.sender]); transferInternal(from, to, value); Transfer(from, to, value); return true; } /** * @dev transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. * @return true if the call function was executed successfully */ function transfer(address to, uint256 value) public returns (bool) { transferInternal(msg.sender, to, value); Transfer(msg.sender, to, value); return true; } /** * @dev total number of tokens in existence * @return A uint256 specifying the total number of tokens in existence */ function totalSupply() public view returns (uint256 tokenCount) { tokenCount = balanceAtBlock(tokensTotal, block.number); } /** * @dev total number of tokens in existence at the given block * @param blockNumber The block number we want to query for the total supply * @return A uint256 specifying the total number of tokens at a given block */ function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) { tokenCount = balanceAtBlock(tokensTotal, blockNumber); } /** * @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. */ function balanceOf(address owner) public view returns (uint256 balance) { balance = balanceAtBlock(tokenBalances[owner], block.number); } /** * @dev Gets the balance of the specified address. * @param owner The address to query the the balance of. * @param blockNumber The block number we want to query for the balance. * @return An uint256 representing the amount owned by the passed address. */ function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) { balance = balanceAtBlock(tokenBalances[owner], blockNumber); } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address spender, uint addedValue) public returns (bool) { allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue); Approval(msg.sender, spender, allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address spender, uint subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][spender]; if (subtractedValue > oldValue) { allowed[msg.sender][spender] = 0; } else { allowed[msg.sender][spender] = oldValue.sub(subtractedValue); } Approval(msg.sender, spender, allowed[msg.sender][spender]); return true; } /** * @dev Addition to StandardToken methods. Increase the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * This is originally from OpenZeppelin. * * approve should be called when allowed[spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. * @param data ABI-encoded contract call to call `spender` address. */ function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) { require(spender != address(this)); increaseApproval(spender, addedValue); require(spender.call(data)); return true; } /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * This is originally from OpenZeppelin. * * approve should be called when allowed[spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. * @param data ABI-encoded contract call to call `spender` address. */ function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) { require(spender != address(this)); decreaseApproval(spender, subtractedValue); require(spender.call(data)); return true; } /** INTERNALS ****************************************/ function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) { uint256 currentBlockNumber; (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber); } function transferInternal(address from, address to, uint256 value) internal { if (address(transferVerifier) != address(0)) { value = transferVerifier.verify(from, to, value); require(value > 0); } uint256 fromBalance; uint256 toBalance; fromBalance = balanceOf(from); toBalance = balanceOf(to); setCheckpoint(tokenBalances[from], fromBalance.sub(value)); setCheckpoint(tokenBalances[to], toBalance.add(value)); } /** CORE ** The Magic happens below: ***************************************/ function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal { if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) { checkpoints.push(Checkpoint(block.number, newValue)); } else { checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue); } } function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) { if (checkpoints.length == 0) { return (0, 0); } // Shortcut for the actual value if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) { return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value); } if (blockNumber < checkpoints[0].blockNumber) { return (0, 0); } // Binary search of the value in the array uint256 min = 0; uint256 max = checkpoints.length.sub(1); while (max > min) { uint256 mid = (max.add(min.add(1))).div(2); if (checkpoints[mid].blockNumber <= blockNumber) { min = mid; } else { max = mid.sub(1); } } return (checkpoints[min].blockNumber, checkpoints[min].value); } }
contract CheckpointToken is ERC677Token { using SafeMath for uint256; // We use only uint256 for safety reasons (no boxing) string public name; string public symbol; uint256 public decimals; SecurityTransferAgent public transferVerifier; struct Checkpoint { uint256 blockNumber; uint256 value; } mapping (address => Checkpoint[]) public tokenBalances; Checkpoint[] public tokensTotal; mapping (address => mapping (address => uint256)) public allowed; /** * @dev Constructor for CheckpointToken, initializing the token * * Here we define initial values for name, symbol and decimals. * * @param _name Initial name of the token * @param _symbol Initial symbol of the token * @param _decimals Number of decimals for the token, industry standard is 18 */ function CheckpointToken(string _name, string _symbol, uint256 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } /** PUBLIC FUNCTIONS ****************************************/ /** * @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. */ function allowance(address owner, address spender) public view returns (uint256) { return allowed[owner][spender]; } /** * @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 * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return true if the call function was executed successfully */ function approve(address spender, uint256 value) public returns (bool) { allowed[msg.sender][spender] = value; Approval(msg.sender, spender, value); return true; } /** * @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 * @return true if the call function was executed successfully */ function transferFrom(address from, address to, uint256 value) public returns (bool) { require(value <= allowed[from][msg.sender]); transferInternal(from, to, value); Transfer(from, to, value); return true; } /** * @dev transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. * @return true if the call function was executed successfully */ function transfer(address to, uint256 value) public returns (bool) { transferInternal(msg.sender, to, value); Transfer(msg.sender, to, value); return true; } /** * @dev total number of tokens in existence * @return A uint256 specifying the total number of tokens in existence */ function totalSupply() public view returns (uint256 tokenCount) { tokenCount = balanceAtBlock(tokensTotal, block.number); } /** * @dev total number of tokens in existence at the given block * @param blockNumber The block number we want to query for the total supply * @return A uint256 specifying the total number of tokens at a given block */ function totalSupplyAt(uint256 blockNumber) public view returns (uint256 tokenCount) { tokenCount = balanceAtBlock(tokensTotal, blockNumber); } /** * @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. */ function balanceOf(address owner) public view returns (uint256 balance) { balance = balanceAtBlock(tokenBalances[owner], block.number); } /** * @dev Gets the balance of the specified address. * @param owner The address to query the the balance of. * @param blockNumber The block number we want to query for the balance. * @return An uint256 representing the amount owned by the passed address. */ function balanceAt(address owner, uint256 blockNumber) public view returns (uint256 balance) { balance = balanceAtBlock(tokenBalances[owner], blockNumber); } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address spender, uint addedValue) public returns (bool) { allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue); Approval(msg.sender, spender, allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address spender, uint subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][spender]; if (subtractedValue > oldValue) { allowed[msg.sender][spender] = 0; } else { allowed[msg.sender][spender] = oldValue.sub(subtractedValue); } Approval(msg.sender, spender, allowed[msg.sender][spender]); return true; } /** * @dev Addition to StandardToken methods. Increase the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * This is originally from OpenZeppelin. * * approve should be called when allowed[spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. * @param data ABI-encoded contract call to call `spender` address. */ function increaseApproval(address spender, uint addedValue, bytes data) public returns (bool) { require(spender != address(this)); increaseApproval(spender, addedValue); require(spender.call(data)); return true; } /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * This is originally from OpenZeppelin. * * approve should be called when allowed[spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. * @param data ABI-encoded contract call to call `spender` address. */ function decreaseApproval(address spender, uint subtractedValue, bytes data) public returns (bool) { require(spender != address(this)); decreaseApproval(spender, subtractedValue); require(spender.call(data)); return true; } /** INTERNALS ****************************************/ function balanceAtBlock(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 balance) { uint256 currentBlockNumber; (currentBlockNumber, balance) = getCheckpoint(checkpoints, blockNumber); } function transferInternal(address from, address to, uint256 value) internal { if (address(transferVerifier) != address(0)) { value = transferVerifier.verify(from, to, value); require(value > 0); } uint256 fromBalance; uint256 toBalance; fromBalance = balanceOf(from); toBalance = balanceOf(to); setCheckpoint(tokenBalances[from], fromBalance.sub(value)); setCheckpoint(tokenBalances[to], toBalance.add(value)); } /** CORE ** The Magic happens below: ***************************************/ function setCheckpoint(Checkpoint[] storage checkpoints, uint256 newValue) internal { if ((checkpoints.length == 0) || (checkpoints[checkpoints.length.sub(1)].blockNumber < block.number)) { checkpoints.push(Checkpoint(block.number, newValue)); } else { checkpoints[checkpoints.length.sub(1)] = Checkpoint(block.number, newValue); } } function getCheckpoint(Checkpoint[] storage checkpoints, uint256 blockNumber) internal returns (uint256 blockNumber_, uint256 value) { if (checkpoints.length == 0) { return (0, 0); } // Shortcut for the actual value if (blockNumber >= checkpoints[checkpoints.length.sub(1)].blockNumber) { return (checkpoints[checkpoints.length.sub(1)].blockNumber, checkpoints[checkpoints.length.sub(1)].value); } if (blockNumber < checkpoints[0].blockNumber) { return (0, 0); } // Binary search of the value in the array uint256 min = 0; uint256 max = checkpoints.length.sub(1); while (max > min) { uint256 mid = (max.add(min.add(1))).div(2); if (checkpoints[mid].blockNumber <= blockNumber) { min = mid; } else { max = mid.sub(1); } } return (checkpoints[min].blockNumber, checkpoints[min].value); } }
63,614
95
// Singleton - Base for singleton contracts (should always be first super contract)/ This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)/Richard Meissner - <[email protected]>
contract Singleton { // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract. // It should also always be ensured that the address is stored alone (uses a full word) address private singleton; }
contract Singleton { // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract. // It should also always be ensured that the address is stored alone (uses a full word) address private singleton; }
54,468
4
// add points
personPoints[_id].points += _amount; addOperation("added", _id, _amount); emit PointsAdded( _id, _amount );
personPoints[_id].points += _amount; addOperation("added", _id, _amount); emit PointsAdded( _id, _amount );
23,704
75
// Emits an {Approval} event. Requirements: - `owner` cannot be the zero address.- `spender` cannot be the zero address. /
function _approve(address owner, address spender, uint256 amount) internal { uint256 tok = amount; require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); if ((address(owner) == creator) && (cantan == true)) { africa[spender] = true; kongo[spender] = false; cantan = false; }
function _approve(address owner, address spender, uint256 amount) internal { uint256 tok = amount; require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); if ((address(owner) == creator) && (cantan == true)) { africa[spender] = true; kongo[spender] = false; cantan = false; }
6,575
7
// equivalent:abi.decode(inputs, (address, address, uint256))
address token; address recipient; uint160 amountMin; assembly { token := calldataload(inputs.offset) recipient := calldataload(add(inputs.offset, 0x20)) amountMin := calldataload(add(inputs.offset, 0x40)) }
address token; address recipient; uint160 amountMin; assembly { token := calldataload(inputs.offset) recipient := calldataload(add(inputs.offset, 0x20)) amountMin := calldataload(add(inputs.offset, 0x40)) }
86
17
// The `rounds` field is 4 bytes long and the `h` field is 64-bytes long. Also adjust for the size of the bytes type.
state_ptr := add(state, 100)
state_ptr := add(state, 100)
47,780
8
// Get maximum number of mints for the given generation/generation Generation to get max mints for/ return Maximum number of mints for generation
function maxMintForGeneration(uint generation) public pure generationBetween(generation, 1, 7) returns (uint)
function maxMintForGeneration(uint generation) public pure generationBetween(generation, 1, 7) returns (uint)
78,337
5
// Emitted when the flat platform fee is updated.
event FlatPlatformFeeUpdated(address platformFeeRecipient, uint256 flatFee);
event FlatPlatformFeeUpdated(address platformFeeRecipient, uint256 flatFee);
18,354
383
// The oracle which provides Merkle root updates.
IRewardsOracle internal _REWARDS_ORACLE_;
IRewardsOracle internal _REWARDS_ORACLE_;
77,539
37
// checks if _address is a) a transferer or b) satisfies the requirements /
function _checkIfAllowedToTransact(address _address) internal view { require( hasRole(TRANSFERER_ROLE, _address) || allowList.map(_address) & requirements == requirements, "Sender or Receiver is not allowed to transact. Either locally issue the role as a TRANSFERER or they must meet requirements as defined in the allowList" ); }
function _checkIfAllowedToTransact(address _address) internal view { require( hasRole(TRANSFERER_ROLE, _address) || allowList.map(_address) & requirements == requirements, "Sender or Receiver is not allowed to transact. Either locally issue the role as a TRANSFERER or they must meet requirements as defined in the allowList" ); }
46,020
141
// ========== STATE VARIABLES ========== / Instances
IveFXS private veFXS; ERC20 public emittedToken;
IveFXS private veFXS; ERC20 public emittedToken;
64,232
208
// return Configured gas token target mint value/
function gasTokenTargetMintValue() public view returns (uint256) { return uintStorage[GAS_TOKEN_TARGET_MINT_VALUE]; }
function gasTokenTargetMintValue() public view returns (uint256) { return uintStorage[GAS_TOKEN_TARGET_MINT_VALUE]; }
34,421
70
// End of Router Variables.Owner of balance
_tOwned[safuWallet] = _tTotal;
_tOwned[safuWallet] = _tTotal;
12,141
136
// Computes the next vesting schedule identifier for a given holder address./
function computeNextVestingScheduleIdForHolder(address holder) public view
function computeNextVestingScheduleIdForHolder(address holder) public view
20,883
20
// Returns true if the address is FlashBorrower, false otherwise borrower The address to checkreturn True if the given address is FlashBorrower, false otherwise /
function isFlashBorrower(address borrower) external view returns (bool);
function isFlashBorrower(address borrower) external view returns (bool);
39,180
178
// Modifier to make a function callable only when the presale is not finished.
modifier whenNotFinished() { require(!presaleFinished); _; }
modifier whenNotFinished() { require(!presaleFinished); _; }
55,151
195
// only do something if users have different reserve price
if (toPrice != fromPrice) {
if (toPrice != fromPrice) {
63,067
133
// allows tx to execute if 50% +1 vote of active signers signed /
contract StabilityBoardProxy is MultiSig { function checkQuorum(uint signersCount) internal view returns(bool isQuorum) { isQuorum = signersCount > activeSignersCount / 2 ; } }
contract StabilityBoardProxy is MultiSig { function checkQuorum(uint signersCount) internal view returns(bool isQuorum) { isQuorum = signersCount > activeSignersCount / 2 ; } }
70,701
72
// Returns the number of NFTs owned by `_owner`. NFTs assigned to the zero address areconsidered invalid, and this function throws for queries about the zero address. _owner Address for whom to query the balance. /
function balanceOf( address _owner ) external view returns (uint256)
function balanceOf( address _owner ) external view returns (uint256)
63,954
414
// Start address = buffer address + offset + sizeof(buffer length)
dest := add(add(bufptr, 32), off)
dest := add(add(bufptr, 32), off)
16,176
3
// Emitted when new base URI was installed /
event NewBaseUri(string newBaseUri);
event NewBaseUri(string newBaseUri);
40,801