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
65
// Amount tokens after fees.
uint256 tTransferAmount;
uint256 tTransferAmount;
25,183
8
// n1/d1 < n2/d2 = d2n1 < n2d2
function lt(Rational.Rational256 memory r1, Rational.Rational256 memory r2) internal pure returns (bool) { return r1.n.mul(r2.d) < r2.n.mul(r1.d); }
function lt(Rational.Rational256 memory r1, Rational.Rational256 memory r2) internal pure returns (bool) { return r1.n.mul(r2.d) < r2.n.mul(r1.d); }
1,607
205
// Function to accept a request.msg.sender must be _payer, The request must be in the state CREATED (not CANCELED, not ACCEPTED)._requestId id of the request /
function acceptAction(bytes32 _requestId) public whenNotPaused onlyRequestPayer(_requestId)
function acceptAction(bytes32 _requestId) public whenNotPaused onlyRequestPayer(_requestId)
5,084
25
// STORAGE // FUNCTIONS / Write Access
function AccessoryData() public { }
function AccessoryData() public { }
44,377
15
// mapping of: address of api-key used in trading => address of account map funds used in settling /
constructor(address[] memory _owners, string memory _version) HasOwners(_owners) public { version = _version; }
constructor(address[] memory _owners, string memory _version) HasOwners(_owners) public { version = _version; }
3,482
8
// STORAGE //A mapping from tot IDs to the address that owns them. All tots have/some valid owner address.
mapping (uint256 => address) public totIndexToOwner;
mapping (uint256 => address) public totIndexToOwner;
79,641
149
// Checks msg.sender can transfer a token, by being owner, approved, or operator _tokenId uint256 ID of the token to validate /
modifier canTransfer(uint256 _tokenId) { require(isApprovedOrOwner(msg.sender, _tokenId)); _; }
modifier canTransfer(uint256 _tokenId) { require(isApprovedOrOwner(msg.sender, _tokenId)); _; }
27,742
209
// mint fungible G-UNI tokens, fractional shares of a Uniswap V3 position/to compute the amouint of tokens necessary to mint `mintAmount` see getMintAmounts/mintAmount The number of G-UNI tokens to mint/receiver The account to receive the minted tokens/ return amount0 amount of token0 transferred from msg.sender to mint `mintAmount`/ return amount1 amount of token1 transferred from msg.sender to mint `mintAmount`/ return liquidityMinted amount of liquidity added to the underlying Uniswap V3 position solhint-disable-next-line function-max-lines, code-complexity
function mint(uint256 mintAmount, address receiver) external nonReentrant returns ( uint256 amount0, uint256 amount1, uint128 liquidityMinted )
function mint(uint256 mintAmount, address receiver) external nonReentrant returns ( uint256 amount0, uint256 amount1, uint128 liquidityMinted )
63,178
25
// transfer principal from sender -> beneficiary
TransferHelper.safeTransferFrom(token, sender, beneficiary, input);
TransferHelper.safeTransferFrom(token, sender, beneficiary, input);
38,923
10
// покупка объекта
function BuyThisProduct() public payable{ require(Sale == true); require(msg.value == Cost); require(msg.sender != Owner); Owner.transfer(msg.value); Owner = msg.sender; Sale = false; ContactTelephon = ''; }
function BuyThisProduct() public payable{ require(Sale == true); require(msg.value == Cost); require(msg.sender != Owner); Owner.transfer(msg.value); Owner = msg.sender; Sale = false; ContactTelephon = ''; }
29,877
35
// Getting reflection value from token value./
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } }
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } }
43,007
11
// Transfers all tokens to multisig wallet
function walletWithdraw() public isWallet
function walletWithdraw() public isWallet
22,930
1
// If the user is already registered
if (userIsRegistered(_wallet)) { return false; }
if (userIsRegistered(_wallet)) { return false; }
29,677
7
// Allows pool owner to set the pool price./unitaryValue Value of 1 token in wei units.
function setUnitaryValue(uint256 unitaryValue) external;
function setUnitaryValue(uint256 unitaryValue) external;
4,494
12
// Require une bonne sélection des DAO
require(_daoIndex == 1 || _daoIndex == 2 || _daoIndex == 3 || _daoIndex == 4, "Propose in a DAO/SubDao that exists"); if (_daoIndex == 1) { require(voters[msg.sender].isInYsfDao == true, "You are not allowed to propose in this part of the DAO"); } else if (_daoIndex == 2) {
require(_daoIndex == 1 || _daoIndex == 2 || _daoIndex == 3 || _daoIndex == 4, "Propose in a DAO/SubDao that exists"); if (_daoIndex == 1) { require(voters[msg.sender].isInYsfDao == true, "You are not allowed to propose in this part of the DAO"); } else if (_daoIndex == 2) {
10,098
187
// Local Request ID => Service Agreement ID
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
22,990
166
// otherwise we accrue any unaccounted for spent stake to totalClaimableAmount
claimableRookToAccrue += commitment.stakeSpent - stakeSpent[commitment.stakeAddress];
claimableRookToAccrue += commitment.stakeSpent - stakeSpent[commitment.stakeAddress];
34,280
4
// withdraw LP /
function withdraw(uint256 _amount) public override onlyOwner() { if(stakeRewards != address(0) && _amount > 0) { IMasterChef(stakeRewards).withdraw(pid, _amount); TransferHelper.safeTransfer(stakeLpPair, address(stakeGatling),_amount); } }
function withdraw(uint256 _amount) public override onlyOwner() { if(stakeRewards != address(0) && _amount > 0) { IMasterChef(stakeRewards).withdraw(pid, _amount); TransferHelper.safeTransfer(stakeLpPair, address(stakeGatling),_amount); } }
43,202
13
// execute a deposit of assets on behalf of given address assetAmount quantity of assets to deposit receiver recipient of shares resulting from depositreturn shareAmount quantity of shares to mint /
function deposit(uint256 assetAmount, address receiver)
function deposit(uint256 assetAmount, address receiver)
37,715
6
// Functions//This function stakes the five initial miners, sets the supply and all the constant variables. This function is called by the constructor function on TellorMaster.sol/
function init(OldTellorStorage.TellorStorageStruct storage self) public{ require(self.uintVars[keccak256("decimals")] == 0); //Give this contract 6000 Tellor Tributes so that it can stake the initial 6 miners OldTellorTransfer.updateBalanceAtNow(self.balances[address(this)], 2**256-1 - 6000e18); // //the initial 5 miner addresses are specfied below // //changed payable[5] to 6 address payable[6] memory _initalMiners = [address(0xE037EC8EC9ec423826750853899394dE7F024fee), address(0xcdd8FA31AF8475574B8909F135d510579a8087d3), address(0xb9dD5AfD86547Df817DA2d0Fb89334A6F8eDd891), address(0x230570cD052f40E14C14a81038c6f3aa685d712B), address(0x3233afA02644CCd048587F8ba6e99b3C00A34DcC), address(0xe010aC6e0248790e08F42d5F697160DEDf97E024)]; //Stake each of the 5 miners specified above for(uint i=0;i<6;i++){//6th miner to allow for dispute //Miner balance is set at 1000e18 at the block that this function is ran OldTellorTransfer.updateBalanceAtNow(self.balances[_initalMiners[i]],1000e18); OldnewStake(self, _initalMiners[i]); } //update the total suppply self.uintVars[keccak256("total_supply")] += 6000e18;//6th miner to allow for dispute //set Constants self.uintVars[keccak256("decimals")] = 18; self.uintVars[keccak256("targetMiners")] = 200; self.uintVars[keccak256("stakeAmount")] = 1000e18; self.uintVars[keccak256("disputeFee")] = 970e18; self.uintVars[keccak256("timeTarget")]= 600; self.uintVars[keccak256("timeOfLastNewValue")] = now - now % self.uintVars[keccak256("timeTarget")]; self.uintVars[keccak256("difficulty")] = 1; }
function init(OldTellorStorage.TellorStorageStruct storage self) public{ require(self.uintVars[keccak256("decimals")] == 0); //Give this contract 6000 Tellor Tributes so that it can stake the initial 6 miners OldTellorTransfer.updateBalanceAtNow(self.balances[address(this)], 2**256-1 - 6000e18); // //the initial 5 miner addresses are specfied below // //changed payable[5] to 6 address payable[6] memory _initalMiners = [address(0xE037EC8EC9ec423826750853899394dE7F024fee), address(0xcdd8FA31AF8475574B8909F135d510579a8087d3), address(0xb9dD5AfD86547Df817DA2d0Fb89334A6F8eDd891), address(0x230570cD052f40E14C14a81038c6f3aa685d712B), address(0x3233afA02644CCd048587F8ba6e99b3C00A34DcC), address(0xe010aC6e0248790e08F42d5F697160DEDf97E024)]; //Stake each of the 5 miners specified above for(uint i=0;i<6;i++){//6th miner to allow for dispute //Miner balance is set at 1000e18 at the block that this function is ran OldTellorTransfer.updateBalanceAtNow(self.balances[_initalMiners[i]],1000e18); OldnewStake(self, _initalMiners[i]); } //update the total suppply self.uintVars[keccak256("total_supply")] += 6000e18;//6th miner to allow for dispute //set Constants self.uintVars[keccak256("decimals")] = 18; self.uintVars[keccak256("targetMiners")] = 200; self.uintVars[keccak256("stakeAmount")] = 1000e18; self.uintVars[keccak256("disputeFee")] = 970e18; self.uintVars[keccak256("timeTarget")]= 600; self.uintVars[keccak256("timeOfLastNewValue")] = now - now % self.uintVars[keccak256("timeTarget")]; self.uintVars[keccak256("difficulty")] = 1; }
20,404
296
// Fees - Deposit fee, in BPS
uint256 public override depositFee;
uint256 public override depositFee;
29,433
40
// get the video info by video hash.
function getVideoInfo(string hash) public view returns ( string name, string cover_hash, string[] keywords, uint256 trx_reward, uint256 token_reward,
function getVideoInfo(string hash) public view returns ( string name, string cover_hash, string[] keywords, uint256 trx_reward, uint256 token_reward,
31,738
10
// Calculates the "seconds per liquidity" accumulator for a range.
function rangeSecondsInside( IConcentratedLiquidityPool pool, int24 lowerTick, int24 upperTick
function rangeSecondsInside( IConcentratedLiquidityPool pool, int24 lowerTick, int24 upperTick
53,437
273
// credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds
if (!credited) { amount = _creditTo(_srcChainId, address(this), amount); creditedPackets[_srcChainId][_srcAddress][_nonce] = true; }
if (!credited) { amount = _creditTo(_srcChainId, address(this), amount); creditedPackets[_srcChainId][_srcAddress][_nonce] = true; }
12,749
36
// Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver recipient address The address which you want to transfer to amount uint256 The amount of tokens to be transferredreturn true unless throwing /
function transferAndCall(address recipient, uint256 amount) external returns (bool);
function transferAndCall(address recipient, uint256 amount) external returns (bool);
37,308
62
// Returns the amount of tokens in existence. /
function totalSupply() external view returns (uint256);
function totalSupply() external view returns (uint256);
44,747
3
// MANIPULATIONS//Create token/Create token/account Address will receive token/value Amount of token to be minted
function mint(address account, uint value) external onlyOwner onlyMeaningfulValue(value)
function mint(address account, uint value) external onlyOwner onlyMeaningfulValue(value)
49,911
12
// you win!
winnerLog.logWinner(msg.sender, players[msg.sender].playerNo, players[msg.sender].name); uint256 winnerNum = winnerLog.getWinnerAddrs().length;
winnerLog.logWinner(msg.sender, players[msg.sender].playerNo, players[msg.sender].name); uint256 winnerNum = winnerLog.getWinnerAddrs().length;
50,766
50
// Gas : 26266
test = 30;
test = 30;
16,301
12
// note: derived contracts may optionally implement iEtherReceiver/iEtherTransactor, etc,
// as desired or simply declare {receive()} to accept payments of ETH to this contract // this is neccessary if the inheriting contract must pay ETH for external transactions to // other contracts or wallet addresses constructor( string memory name, string memory symbol, //string memory version, uint256 initialSupply )internal //ERC20AccessControlToken(name,symbol,0) MortalERC20BurnableToken( name, symbol ) PausableAccessControl() { //tokenCap.requireGreaterThanOrEqual( //initialSupply, //_NAME.concatenate("initial supply > cap") //); address sender = _msgSender(); _setupRole(ROLE_MINTER, sender); _setupRole(ROLE_BURNER, sender); //_registerInterface(type(iSafeERC20Mint).interfaceId); if(initialSupply > 0){ _mint(sender, initialSupply); } }
// as desired or simply declare {receive()} to accept payments of ETH to this contract // this is neccessary if the inheriting contract must pay ETH for external transactions to // other contracts or wallet addresses constructor( string memory name, string memory symbol, //string memory version, uint256 initialSupply )internal //ERC20AccessControlToken(name,symbol,0) MortalERC20BurnableToken( name, symbol ) PausableAccessControl() { //tokenCap.requireGreaterThanOrEqual( //initialSupply, //_NAME.concatenate("initial supply > cap") //); address sender = _msgSender(); _setupRole(ROLE_MINTER, sender); _setupRole(ROLE_BURNER, sender); //_registerInterface(type(iSafeERC20Mint).interfaceId); if(initialSupply > 0){ _mint(sender, initialSupply); } }
10,125
33
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf[msg.sender] < _value) revert(); balanceOf[msg.sender] = SafeMath.sub(balanceOf[msg.sender], _value); balanceOf[_to] = SafeMath.add(balanceOf[_to], _value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; }
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf[msg.sender] < _value) revert(); balanceOf[msg.sender] = SafeMath.sub(balanceOf[msg.sender], _value); balanceOf[_to] = SafeMath.add(balanceOf[_to], _value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; }
65,424
127
// The ERC20 transfer function
function transfer(address to, uint256 amount) public override returns (bool)
function transfer(address to, uint256 amount) public override returns (bool)
9,031
2
// Event emitted when gov is changed /
event NewGov(address oldGov, address newGov);
event NewGov(address oldGov, address newGov);
1,818
4
// Permits actions only from owner /
modifier onlyOwner { require(msg.sender == owner, "Only the contract owner may perform this action"); _; }
modifier onlyOwner { require(msg.sender == owner, "Only the contract owner may perform this action"); _; }
34,516
12
// Returns the pool oracle contract for twap
function poolOracle() external view returns (address);
function poolOracle() external view returns (address);
26,899
12
// Creates a new drip with the given name and configuration. Once created, drips cannotbe modified in any way (this is a security measure). If you want to update a drip,simply pause (and potentially archive) the existing drip and create a new one._name Name of the drip. _config Configuration for the drip. /
function create(string calldata _name, DripConfig calldata _config) external onlyOwner {
function create(string calldata _name, DripConfig calldata _config) external onlyOwner {
10,580
37
// check for the same categoryStringUtils
if (keccak256(cards[i].category)==keccak256(cardCategory)){ cards[i].Iswildcard=0; }
if (keccak256(cards[i].category)==keccak256(cardCategory)){ cards[i].Iswildcard=0; }
37,091
79
// run over the input, 3 bytes at a time
for {} lt(dataPtr, endPtr) {}
for {} lt(dataPtr, endPtr) {}
3,552
739
// Decrease shareholder point./Can only be called by the LoC contract./account Account address/amount The amount to decrease.
function decreaseShareholderPoint(address account, uint256 amount) external onlyController { _decreaseShareholderPoint(account, amount); }
function decreaseShareholderPoint(address account, uint256 amount) external onlyController { _decreaseShareholderPoint(account, amount); }
49,482
7
// overrides spender allowance/may be used to implemented forced transfers in which token controller may override approved allowance/with any > 0 value and then use transferFrom to execute such transfer/This by definition creates non-trustless token so do not implement this call if you do not need trustless transfers!/Implementer should not allow approve() to be executed if there is an overrride Implemented should return allowance() taking into account override
function onAllowance(address owner, address spender) public constant returns (uint256 allowanceOverride);
function onAllowance(address owner, address spender) public constant returns (uint256 allowanceOverride);
21,382
18
// verifies that the caller is mapped to the given contract name _contractNamecontract name/
modifier only(bytes32 _contractName) { require(msg.sender == addressOf(_contractName)); _; }
modifier only(bytes32 _contractName) { require(msg.sender == addressOf(_contractName)); _; }
14,679
43
// checks if this address has already cast a votethis is required to find out if it is safe to call the other "thisVoters..." views./
function thisVoterExists() external view
function thisVoterExists() external view
52,409
6
// Authorization
mapping(address => bool) authorizedContracts;
mapping(address => bool) authorizedContracts;
44,799
150
// See {IERC721-safeTransferFrom}. /
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); }
284
306
// Pending to claim ownership address
address public pendingGovernance;
address public pendingGovernance;
1,293
14
// The initiate of the action
address indexed caller,
address indexed caller,
4,853
68
// Throws unless `msg.sender` is the current owner, an authorized operator, or the approvedaddress for this NFT. Throws if `_from` is not the current owner. Throws if `_to` is the zeroaddress. Throws if `_tokenId` is not a valid NFT. This function can be changed to payable. The caller is responsible to confirm that `_to` is capable of receiving NFTs or elsethey maybe be permanently lost. _from The current owner of the NFT. _to The new owner. _tokenId The NFT to transfer. /
function transferFrom( address _from, address _to, uint256 _tokenId ) external canTransfer(_tokenId) validNFToken(_tokenId)
function transferFrom( address _from, address _to, uint256 _tokenId ) external canTransfer(_tokenId) validNFToken(_tokenId)
3,785
375
// returns the symbol of the native token/ERC20 token /
function symbol(Token token) internal view returns (string memory) { if (isNative(token)) { return NATIVE_TOKEN_SYMBOL; } return toERC20(token).symbol(); }
function symbol(Token token) internal view returns (string memory) { if (isNative(token)) { return NATIVE_TOKEN_SYMBOL; } return toERC20(token).symbol(); }
18,426
183
// 40k / 480k
return _toAlphabet(_reverse(_truncate(digits, digitlength)));
return _toAlphabet(_reverse(_truncate(digits, digitlength)));
14,797
109
// Approve the passed address to spend the specified _amount of tokens on behalf ofmsg.sender. This method is included for ERC20 compatibility.increaseAllowance and decreaseAllowance should be used instead.Changing an allowance with this method brings the risk that someone may transfer boththe old and the new allowance - if they are both greater than zero - if a transfertransaction is mined before the later approve() call is mined._spender The address which will spend the funds. _value The _amount of tokens to be spent. /
function approve(address _spender, uint256 _value) public returns (bool) { _allowances[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
function approve(address _spender, uint256 _value) public returns (bool) { _allowances[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
24,869
1
// This dino name has already been proposed.
error DinoNameAlreadyProposed();
error DinoNameAlreadyProposed();
34,306
107
// Store information on the current Adharma Contingency status.
AdharmaContingency private _adharma;
AdharmaContingency private _adharma;
4,857
31
// --- VM 10000 ---
yMining[3].VM = 10000e18;
yMining[3].VM = 10000e18;
24,935
2
// The marker value for a sell order for computing the order struct/ hash. This allows the EIP-712 compatible wallets to display a/ descriptive string for the order kind (instead of 0 or 1).// This value is pre-computed from the following expression:/ ```/ keccak256("sell")/ ```
bytes32 internal constant KIND_SELL = hex"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775";
bytes32 internal constant KIND_SELL = hex"f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775";
6,456
23
// Compound, sAave
uint256[2] calldata amounts, uint256 min_mint_amount, bool _use_underlying ) external payable returns (uint256); function add_liquidity(
uint256[2] calldata amounts, uint256 min_mint_amount, bool _use_underlying ) external payable returns (uint256); function add_liquidity(
26,927
156
// One if last block
(err, last) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, s.output); }
(err, last) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, s.output); }
8,625
28
// Split the remaining balance half-half
if (balance != 0) { uint balancePerSpouse = balance / 2;
if (balance != 0) { uint balancePerSpouse = balance / 2;
8,751
228
// Finalize starting index /
function finalizeStartingIndex() public { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = uint(blockhash(startingIndexBlock)) % MAX_NFT_SUPPLY; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if (block.number.sub(startingIndexBlock) > 255) { startingIndex = uint(blockhash(block.number-1)) % MAX_NFT_SUPPLY; } // Prevent default sequence if (startingIndex == 0) { startingIndex = startingIndex.add(1); } }
function finalizeStartingIndex() public { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = uint(blockhash(startingIndexBlock)) % MAX_NFT_SUPPLY; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if (block.number.sub(startingIndexBlock) > 255) { startingIndex = uint(blockhash(block.number-1)) % MAX_NFT_SUPPLY; } // Prevent default sequence if (startingIndex == 0) { startingIndex = startingIndex.add(1); } }
23,692
401
// Reset timelock time lock
timeLockProposalTime = 0;
timeLockProposalTime = 0;
47,127
207
// Presale
mapping (address => bool) private presaleClaimed; // Everyone who got in on the presale can only claim once. address private signVerifier;
mapping (address => bool) private presaleClaimed; // Everyone who got in on the presale can only claim once. address private signVerifier;
73,607
254
// Function to set the base URI for all token IDs. It is automatically added as a prefix to the token id in {tokenURI} to retrieve the token URI. /
function setBaseURI(string calldata baseURI_) external onlyOwner { _baseURI = baseURI_; }
function setBaseURI(string calldata baseURI_) external onlyOwner { _baseURI = baseURI_; }
46,980
55
// wallet specific storage
mapping (address => GuardianStorageConfig) internal configs;
mapping (address => GuardianStorageConfig) internal configs;
994
45
// release distribute rewards to all claimers Only governance can call this function /
function release() external onlyOwner { require( batchQuestClaimers.length == batchQuestMaxClaimers, "!ClaimerNotFull" ); // Get the amount per claimer; it's rounded down. // So it may only utilize 99.99999% of the provided amount uint256 amountPerClaimer = batchQuestRewardTokenAmount / batchQuestClaimers.length; for (uint256 i = 0; i < batchQuestClaimers.length; i++) { // Get the claimer address claimer = batchQuestClaimers[i]; // Transfer the token to the claimer IERC20(batchQuestRewardTokenAddress).safeTransfer( claimer, amountPerClaimer ); // Mint the NFT _mint(claimer, NFT, 1, ""); } uint256 totalRewardSent = batchQuestClaimers.length * amountPerClaimer; emit RewardReleased( msg.sender, batchQuestClaimers.length, amountPerClaimer, totalRewardSent ); }
function release() external onlyOwner { require( batchQuestClaimers.length == batchQuestMaxClaimers, "!ClaimerNotFull" ); // Get the amount per claimer; it's rounded down. // So it may only utilize 99.99999% of the provided amount uint256 amountPerClaimer = batchQuestRewardTokenAmount / batchQuestClaimers.length; for (uint256 i = 0; i < batchQuestClaimers.length; i++) { // Get the claimer address claimer = batchQuestClaimers[i]; // Transfer the token to the claimer IERC20(batchQuestRewardTokenAddress).safeTransfer( claimer, amountPerClaimer ); // Mint the NFT _mint(claimer, NFT, 1, ""); } uint256 totalRewardSent = batchQuestClaimers.length * amountPerClaimer; emit RewardReleased( msg.sender, batchQuestClaimers.length, amountPerClaimer, totalRewardSent ); }
18,036
2
// Pre-Sale
uint256 public floorPrice = 0.2 ether; mapping(address => uint256) public whitelistClaimed; bytes32 private merkleRoot; uint256 public preSaleAmountMinted; bool public isPreSaleLive;
uint256 public floorPrice = 0.2 ether; mapping(address => uint256) public whitelistClaimed; bytes32 private merkleRoot; uint256 public preSaleAmountMinted; bool public isPreSaleLive;
30,962
1,024
// Checks if Boost/Repay could be triggered for the CDP/Called by MCDMonitor to enforce the min/max check
function canCall(Method _method, uint _cdpId, uint _nextPrice) public view returns(bool, uint) { bool subscribed; CdpHolder memory holder; (subscribed, holder) = subscriptionsContract.getCdpHolder(_cdpId); // check if cdp is subscribed if (!subscribed) return (false, 0); // check if using next price is allowed if (_nextPrice > 0 && !holder.nextPriceEnabled) return (false, 0); // check if boost and boost allowed if (_method == Method.Boost && !holder.boostEnabled) return (false, 0); // check if owner is still owner if (getOwner(_cdpId) != holder.owner) return (false, 0); uint currRatio = getRatio(_cdpId, _nextPrice); if (_method == Method.Repay) { return (currRatio < holder.minRatio, currRatio); } else if (_method == Method.Boost) { return (currRatio > holder.maxRatio, currRatio); } }
function canCall(Method _method, uint _cdpId, uint _nextPrice) public view returns(bool, uint) { bool subscribed; CdpHolder memory holder; (subscribed, holder) = subscriptionsContract.getCdpHolder(_cdpId); // check if cdp is subscribed if (!subscribed) return (false, 0); // check if using next price is allowed if (_nextPrice > 0 && !holder.nextPriceEnabled) return (false, 0); // check if boost and boost allowed if (_method == Method.Boost && !holder.boostEnabled) return (false, 0); // check if owner is still owner if (getOwner(_cdpId) != holder.owner) return (false, 0); uint currRatio = getRatio(_cdpId, _nextPrice); if (_method == Method.Repay) { return (currRatio < holder.minRatio, currRatio); } else if (_method == Method.Boost) { return (currRatio > holder.maxRatio, currRatio); } }
26,118
2
// Issued tokens by code - hash associated to any form of identity off chain hash of code => Event Id hash
mapping(bytes32 => bytes32) public issuedCodeTokens;
mapping(bytes32 => bytes32) public issuedCodeTokens;
24,628
166
// --------------------------------------------/ Only 10000 first gen crabs /--------------------------------------------/ 9000 publicly mintable crabs
uint256 public constant maxSupply = 10000;
uint256 public constant maxSupply = 10000;
3,153
63
// If this node is the last element in the path, it'll be correctly encoded and we can skip this part.
if (previousNodeHash.length > 0) {
if (previousNodeHash.length > 0) {
26,470
56
// transfer of money from buyer to beneficiary
prevOwner.transfer(price);
prevOwner.transfer(price);
36,626
6
// Main Function /
function _payFee(uint128 _price, address _referralAddress) internal returns (uint128 _processing){ uint128 _cut = _price / 100; _processing = _price - _cut; if (_referralAddress != address(0)){ _referralAddress.transfer(_cut); } else { ownerBank = ownerBank + _cut; } uint8 i; for (i = 0; i < sevenWinnerAddresses.length; i++){ addressToBalance[sevenWinnerAddresses[i]] = addressToBalance[sevenWinnerAddresses[i]] + _cut; _processing = _processing - _cut; } uint128 _remaining = (7 - uint8(sevenWinnerAddresses.length)) * _cut; ownerBank = ownerBank + _remaining; _processing = _processing - _remaining; }
function _payFee(uint128 _price, address _referralAddress) internal returns (uint128 _processing){ uint128 _cut = _price / 100; _processing = _price - _cut; if (_referralAddress != address(0)){ _referralAddress.transfer(_cut); } else { ownerBank = ownerBank + _cut; } uint8 i; for (i = 0; i < sevenWinnerAddresses.length; i++){ addressToBalance[sevenWinnerAddresses[i]] = addressToBalance[sevenWinnerAddresses[i]] + _cut; _processing = _processing - _cut; } uint128 _remaining = (7 - uint8(sevenWinnerAddresses.length)) * _cut; ownerBank = ownerBank + _remaining; _processing = _processing - _remaining; }
47,872
107
// Only used by Ethereum client (see https:github.com/openethereum/parity-ethereum/pull/11245)./ Returns a boolean flag indicating whether the specified validator/ should report about some validator's misbehaviour at the specified block./_reportingMiningAddress The mining address of validator who reports./_maliciousMiningAddress The mining address of malicious validator./_blockNumber The block number at which the validator misbehaved.
function shouldValidatorReport( address _reportingMiningAddress, address _maliciousMiningAddress, uint256 _blockNumber
function shouldValidatorReport( address _reportingMiningAddress, address _maliciousMiningAddress, uint256 _blockNumber
13,550
84
// <CHK>1) 移転時の発行体承諾が不要な場合2) 移転不可の場合3) 数量が残高を超えている場合-> REVERT
if (transferApprovalRequired == false || transferable == false || balanceOf(msg.sender) < _value) { revert(); }
if (transferApprovalRequired == false || transferable == false || balanceOf(msg.sender) < _value) { revert(); }
48,881
116
// ENS abstract address resolver/
abstract contract ENSAddressResolver is ENSAbstractResolver { bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked("addr(bytes32)"))); bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked("addr(bytes32,uint)"))); uint internal constant COIN_TYPE_ETH = 60; mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses; // events event AddrChanged( bytes32 indexed node, address addr ); event AddressChanged( bytes32 indexed node, uint coinType, bytes newAddress ); // external functions function setAddr( bytes32 node, address addr_ ) external onlyNodeOwner(node) { _setAddr(node, addr_); } function setAddr( bytes32 node, uint coinType, bytes memory addr_ ) external onlyNodeOwner(node) { _setAddr(node, coinType, addr_); } // external functions (views) function addr( bytes32 node ) external view returns (address) { return _addr(node); } function addr( bytes32 node, uint coinType ) external view returns (bytes memory) { return resolverAddresses[node][coinType]; } // internal functions function _setAddr( bytes32 node, address addr_ ) internal { _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_)); } function _setAddr( bytes32 node, uint coinType, bytes memory addr_ ) internal { emit AddressChanged(node, coinType, addr_); if(coinType == COIN_TYPE_ETH) { emit AddrChanged(node, _bytesToAddress(addr_)); } resolverAddresses[node][coinType] = addr_; } // internal functions (views) function _addr( bytes32 node ) internal view returns (address) { address result; bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH]; if (addr_.length > 0) { result = _bytesToAddress(addr_); } return result; } // private function (pure) function _bytesToAddress( bytes memory data ) private pure returns(address payable) { address payable result; require(data.length == 20); // solhint-disable-next-line no-inline-assembly assembly { result := div(mload(add(data, 32)), exp(256, 12)) } return result; } function _addressToBytes( address addr_ ) private pure returns(bytes memory) { bytes memory result = new bytes(20); // solhint-disable-next-line no-inline-assembly assembly { mstore(add(result, 32), mul(addr_, exp(256, 12))) } return result; } }
abstract contract ENSAddressResolver is ENSAbstractResolver { bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked("addr(bytes32)"))); bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked("addr(bytes32,uint)"))); uint internal constant COIN_TYPE_ETH = 60; mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses; // events event AddrChanged( bytes32 indexed node, address addr ); event AddressChanged( bytes32 indexed node, uint coinType, bytes newAddress ); // external functions function setAddr( bytes32 node, address addr_ ) external onlyNodeOwner(node) { _setAddr(node, addr_); } function setAddr( bytes32 node, uint coinType, bytes memory addr_ ) external onlyNodeOwner(node) { _setAddr(node, coinType, addr_); } // external functions (views) function addr( bytes32 node ) external view returns (address) { return _addr(node); } function addr( bytes32 node, uint coinType ) external view returns (bytes memory) { return resolverAddresses[node][coinType]; } // internal functions function _setAddr( bytes32 node, address addr_ ) internal { _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_)); } function _setAddr( bytes32 node, uint coinType, bytes memory addr_ ) internal { emit AddressChanged(node, coinType, addr_); if(coinType == COIN_TYPE_ETH) { emit AddrChanged(node, _bytesToAddress(addr_)); } resolverAddresses[node][coinType] = addr_; } // internal functions (views) function _addr( bytes32 node ) internal view returns (address) { address result; bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH]; if (addr_.length > 0) { result = _bytesToAddress(addr_); } return result; } // private function (pure) function _bytesToAddress( bytes memory data ) private pure returns(address payable) { address payable result; require(data.length == 20); // solhint-disable-next-line no-inline-assembly assembly { result := div(mload(add(data, 32)), exp(256, 12)) } return result; } function _addressToBytes( address addr_ ) private pure returns(bytes memory) { bytes memory result = new bytes(20); // solhint-disable-next-line no-inline-assembly assembly { mstore(add(result, 32), mul(addr_, exp(256, 12))) } return result; } }
34,915
227
// after each term, mine half SHD token
uint256 public constant MINT_DECREASE_TERM = 9500000;
uint256 public constant MINT_DECREASE_TERM = 9500000;
17,850
64
// it calls a dapp like YearnFinance at a target contract address with specified calldata dappAddress address of the target contract address dappData encoded abi of the function in our contract we want to callreturn the called data in bytes /
function callDapp(address dappAddress, bytes calldata dappData) external payable returns (bytes memory);
function callDapp(address dappAddress, bytes calldata dappData) external payable returns (bytes memory);
9,561
60
// SafeMath will throw with insuficient funds _from or if _id is not valid (balance will be 0)
balances[id][_from] = balances[id][_from].sub(value); balances[id][_to] = value.add(balances[id][_to]);
balances[id][_from] = balances[id][_from].sub(value); balances[id][_to] = value.add(balances[id][_to]);
29,461
141
// / Removes tokens from this Strategy that are not the type of tokens/ managed by this Strategy. This may be used in case of accidentally/ sending the wrong kind of token to this Strategy.// Tokens will be sent to `governance()`.// This will fail if an attempt is made to sweep `want`, or any tokens/ that are protected by this Strategy.// This may only be called by governance./_token The token to transfer out of this poolManager./to Address to send the tokens to./ / Implement `_protectedTokens()` to specify any additional tokens that/ should be protected from sweeping in addition to `want`.
function sweep(address _token, address to) external override onlyRole(GUARDIAN_ROLE) { address[] memory __protectedTokens = _protectedTokens(); for (uint256 i = 0; i < __protectedTokens.length; i++) require(_token != __protectedTokens[i], "93"); IERC20(_token).safeTransfer(to, IERC20(_token).balanceOf(address(this))); }
function sweep(address _token, address to) external override onlyRole(GUARDIAN_ROLE) { address[] memory __protectedTokens = _protectedTokens(); for (uint256 i = 0; i < __protectedTokens.length; i++) require(_token != __protectedTokens[i], "93"); IERC20(_token).safeTransfer(to, IERC20(_token).balanceOf(address(this))); }
59,734
4
// value evaluated to Pool's tokens
function value() external view returns (uint256);
function value() external view returns (uint256);
22,562
43
// Rescues deployed assets to the strategy contract (After YakStrategy) Restricted to `manager` to avoid griefing _strategy address minReturnAmountAccepted amount disableDeposits bool /
function rescueDeployedFunds(address _strategy, uint minReturnAmountAccepted, bool disableDeposits) external onlyManager { IStrategy(_strategy).rescueDeployedFunds(minReturnAmountAccepted, disableDeposits); emit EmergencyWithdraw(_strategy); }
function rescueDeployedFunds(address _strategy, uint minReturnAmountAccepted, bool disableDeposits) external onlyManager { IStrategy(_strategy).rescueDeployedFunds(minReturnAmountAccepted, disableDeposits); emit EmergencyWithdraw(_strategy); }
41,457
216
// returns the expected amount and expected fee for converting one reserve to another_sourceBalancebalance in the source reserve token contract _targetBalancebalance in the target reserve token contract _amount amount of source reserve tokens converted return expected amount in units of the target reserve tokenreturn expected fee in units of the target reserve token /
function targetAmountAndFee( IERC20, /* _sourceToken */ IERC20, /* _targetToken */ uint256 _sourceBalance, uint256 _targetBalance, uint256 _amount
function targetAmountAndFee( IERC20, /* _sourceToken */ IERC20, /* _targetToken */ uint256 _sourceBalance, uint256 _targetBalance, uint256 _amount
26,914
7
// Assigns a new address to act as the CEO. Only available to the current CEO./newCEO The address of the new CEO
function setCEO(address payable newCEO) external onlyCEO { require(newCEO != address(0), "CEO cannot be set to the zero address"); emit OwnershipTransferred(ceoAddress, newCEO); ceoAddress = newCEO; }
function setCEO(address payable newCEO) external onlyCEO { require(newCEO != address(0), "CEO cannot be set to the zero address"); emit OwnershipTransferred(ceoAddress, newCEO); ceoAddress = newCEO; }
357
1
// Emitted when contract is paused by system administrator. /
event ContractPaused();
event ContractPaused();
11,296
57
// This basically locks the supply and borrow indexes to their current values and by thus, stops the accumulating.
isRetired = true;
isRetired = true;
25,694
47
// Used for locking the POLY token _meshAddress Address that compatible the Polymesh blockchain _lockedValue Amount of tokens need to locked /
function limitLock(string calldata _meshAddress, uint256 _lockedValue) external { _lock(_meshAddress, msg.sender, _lockedValue); }
function limitLock(string calldata _meshAddress, uint256 _lockedValue) external { _lock(_meshAddress, msg.sender, _lockedValue); }
28,661
197
// Get accumulated borrow interest via borrows, borrow rate, & block delta.
uint256 interest = borrowRate.mul(blockDelta).mul(borrows) / _SCALING_FACTOR;
uint256 interest = borrowRate.mul(blockDelta).mul(borrows) / _SCALING_FACTOR;
67,266
159
// С.Багапш выразил благодарность членам делегации за проявленный интерес.^^^^^^^^
recognition С_Багапш_1 language=Russian
recognition С_Багапш_1 language=Russian
29,113
37
// Forcefully set next next execution index./s The multisig to set the next execution index for./index The new next execution index.
function forceSetNextExecutionIndex( DualMultisig storage s, uint256 index
function forceSetNextExecutionIndex( DualMultisig storage s, uint256 index
14,555
24
// realize $SQUID earnings for a single Guard and optionally unstake itWolves earn $SQUID proportional to their Alpha rank tokenId the ID of the Guard to claim earnings from unstake whether or not to unstake the Guardreturn owed - the amount of $SQUID earned /
function _claimGuardFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) { require(squuid.ownerOf(tokenId) == address(this), "AINT A PART OF THE PACK"); uint256 alpha = _alphaForGuard(tokenId); Stake memory stake = pack[alpha][packIndices[tokenId]]; require(stake.owner == _msgSender(), "SWIPER, NO SWIPING"); owed = (alpha) * (squidPerAlpha - stake.value); // Calculate portion of tokens based on Alpha if (unstake) { totalAlphaStaked -= alpha; // Remove Alpha from total staked Stake memory lastStake = pack[alpha][pack[alpha].length - 1]; pack[alpha][packIndices[tokenId]] = lastStake; // Shuffle last Guard to current position packIndices[lastStake.tokenId] = packIndices[tokenId]; pack[alpha].pop(); // Remove duplicate delete packIndices[tokenId]; // Delete old mapping squuid.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // Send back Guard } else { pack[alpha][packIndices[tokenId]] = Stake({ owner: _msgSender(), tokenId: uint16(tokenId), value: uint80(squidPerAlpha) }); // reset stake } emit GuardClaimed(tokenId, owed, unstake); }
function _claimGuardFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) { require(squuid.ownerOf(tokenId) == address(this), "AINT A PART OF THE PACK"); uint256 alpha = _alphaForGuard(tokenId); Stake memory stake = pack[alpha][packIndices[tokenId]]; require(stake.owner == _msgSender(), "SWIPER, NO SWIPING"); owed = (alpha) * (squidPerAlpha - stake.value); // Calculate portion of tokens based on Alpha if (unstake) { totalAlphaStaked -= alpha; // Remove Alpha from total staked Stake memory lastStake = pack[alpha][pack[alpha].length - 1]; pack[alpha][packIndices[tokenId]] = lastStake; // Shuffle last Guard to current position packIndices[lastStake.tokenId] = packIndices[tokenId]; pack[alpha].pop(); // Remove duplicate delete packIndices[tokenId]; // Delete old mapping squuid.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // Send back Guard } else { pack[alpha][packIndices[tokenId]] = Stake({ owner: _msgSender(), tokenId: uint16(tokenId), value: uint80(squidPerAlpha) }); // reset stake } emit GuardClaimed(tokenId, owed, unstake); }
17,010
70
// staking
function deposit(uint256 _amount) public { require(creationTime + 24 hours <= now, "It has not been 24 hours since contract creation yet"); address staker = msg.sender; IERC20(RagnaAddress).safeTransferFrom(staker, address(this), _amount); stakerRewards[staker] = stakerRewards[staker].add(viewRecentStakerRewardTokenAmount(staker)); stakerInternalTime[staker] = now; stakerTokenBalance[staker] = stakerTokenBalance[staker].add(_amount); }
function deposit(uint256 _amount) public { require(creationTime + 24 hours <= now, "It has not been 24 hours since contract creation yet"); address staker = msg.sender; IERC20(RagnaAddress).safeTransferFrom(staker, address(this), _amount); stakerRewards[staker] = stakerRewards[staker].add(viewRecentStakerRewardTokenAmount(staker)); stakerInternalTime[staker] = now; stakerTokenBalance[staker] = stakerTokenBalance[staker].add(_amount); }
41,535
45
// Emit log events /
TokensSent(_to, safeMul(tokens, multiplier)); ContributionReceived(_to, _value); Transfer(owner, _to, safeMul(tokens, multiplier)); return true;
TokensSent(_to, safeMul(tokens, multiplier)); ContributionReceived(_to, _value); Transfer(owner, _to, safeMul(tokens, multiplier)); return true;
9,973
62
// For querying totalSupply of token/Required for ERC-721 compliance.
function totalSupply() public view returns (uint256 total) { return poos.length; }
function totalSupply() public view returns (uint256 total) { return poos.length; }
38,321
4
// Recover signer address from a message by using his signature originalMessage bytes32 message, the originalMessage is the signed message. What is recovered is the signer address. signedMessage bytes signature /
function recover(bytes32 originalMessage, bytes memory signedMessage) public pure returns (address) { bytes32 r; bytes32 s; uint8 v; //Check the signature length if (signedMessage.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables assembly { r := mload(add(signedMessage, 32)) s := mload(add(signedMessage, 64)) v := byte(0, mload(add(signedMessage, 96))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible versions if (v < 27) { v += 27; } // If the version is correct return the signer address if (v != 27 && v != 28) { return (address(0)); } else { return ecrecover(originalMessage, v, r, s); } }
function recover(bytes32 originalMessage, bytes memory signedMessage) public pure returns (address) { bytes32 r; bytes32 s; uint8 v; //Check the signature length if (signedMessage.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables assembly { r := mload(add(signedMessage, 32)) s := mload(add(signedMessage, 64)) v := byte(0, mload(add(signedMessage, 96))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible versions if (v < 27) { v += 27; } // If the version is correct return the signer address if (v != 27 && v != 28) { return (address(0)); } else { return ecrecover(originalMessage, v, r, s); } }
19,381
9
// xref:ROOT:erc1155.adocbatch-operations[Batched] version of {balanceOf}. Requirements: - `accounts` and `ids` must have the same length. /
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
9,046
190
// Function modifier to ensure usage of tokens controlled by the Prize Pool/controlledToken The address of the token to check
modifier onlyControlledToken(address controlledToken) { require(_isControlled(controlledToken), "PrizePool/unknown-token"); _; }
modifier onlyControlledToken(address controlledToken) { require(_isControlled(controlledToken), "PrizePool/unknown-token"); _; }
7,076
10
// --- "Interfaces" //Contract that will work with ERC-677 tokens see:/
contract ERC677Receiver { /** * The function is added to contracts enabling them to react to receiving tokens within a single transaction. * The from parameter is the account which just transferred amount from the token contract, data is available to pass * additional parameters, i.e. to indicate what the intention of the transfer is if a contract allows transfers for * multiple reasons. * @param from address sending tokens * @param amount of tokens * @param data to send to another contract */ function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool success); }
contract ERC677Receiver { /** * The function is added to contracts enabling them to react to receiving tokens within a single transaction. * The from parameter is the account which just transferred amount from the token contract, data is available to pass * additional parameters, i.e. to indicate what the intention of the transfer is if a contract allows transfers for * multiple reasons. * @param from address sending tokens * @param amount of tokens * @param data to send to another contract */ function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool success); }
13,372
25
// proposes the safe transfer of a keeper's payee to another address keeper address of the keeper to transfer payee role proposed address to nominate for next payeeship /
function transferPayeeship(address keeper, address proposed) external { if (s_keeperInfo[keeper].payee != msg.sender) revert OnlyCallableByPayee(); if (proposed == msg.sender) revert ValueNotChanged(); if (s_proposedPayee[keeper] != proposed) { s_proposedPayee[keeper] = proposed; emit PayeeshipTransferRequested(keeper, msg.sender, proposed); } }
function transferPayeeship(address keeper, address proposed) external { if (s_keeperInfo[keeper].payee != msg.sender) revert OnlyCallableByPayee(); if (proposed == msg.sender) revert ValueNotChanged(); if (s_proposedPayee[keeper] != proposed) { s_proposedPayee[keeper] = proposed; emit PayeeshipTransferRequested(keeper, msg.sender, proposed); } }
17,539
35
// To update Investment bonus structure _tokenQuantity updated values array /
function updateInvestmentBonus(uint256[][2] memory _tokenQuantity) public onlyOwner { require(_tokenQuantity[0].length == _tokenQuantity[1].length, 'Mismatch length for token quantity bonus'); token_quantity_bonus = _tokenQuantity; }
function updateInvestmentBonus(uint256[][2] memory _tokenQuantity) public onlyOwner { require(_tokenQuantity[0].length == _tokenQuantity[1].length, 'Mismatch length for token quantity bonus'); token_quantity_bonus = _tokenQuantity; }
6,570
38
// Calls back without modifications. return success. function is virtual, and meant to be overridden. /
function _transferWithReference(address _to, uint _value, string _reference, address _sender) internal returns (bool) { return AssetProxy(proxy).__transferWithReference(_to, _value, _reference, _sender); }
function _transferWithReference(address _to, uint _value, string _reference, address _sender) internal returns (bool) { return AssetProxy(proxy).__transferWithReference(_to, _value, _reference, _sender); }
7,730
21
// function viewConcludedPools()onlyWhenRunning onlyWhenAccount_isConnected public view
// returns(uint[] memory ){ // Pool[] memory pool = getList_ofPools().getConcludedPools(); // uint[] memory poolId = new uint[](pool.length); // for(uint i=0; i<pool.length; i++) // poolId[i] = pool[i].getPoolId(); // return poolId; // }
// returns(uint[] memory ){ // Pool[] memory pool = getList_ofPools().getConcludedPools(); // uint[] memory poolId = new uint[](pool.length); // for(uint i=0; i<pool.length; i++) // poolId[i] = pool[i].getPoolId(); // return poolId; // }
48,646
2
// Collection of ProfessionalOffice
mapping(uint32 => ProfessionalOffice) internal offices;
mapping(uint32 => ProfessionalOffice) internal offices;
50,462