Dataset Viewer
Auto-converted to Parquet Duplicate
vulnerable
stringlengths
18
61.3k
fixed
stringlengths
12
45.1k
@dev The ether left (msg.value) must be greater than zero. Otherwise it will throw a require error. */ function() external payable { require(msg.value > 0, "Value must be > 0"); // @dev https://ethereum.stackexchange.com/questions/19341/address-send-vs-address-transfer-best-practice...
@dev The ether left (msg.value) must be greater than zero. Otherwise it will throw a require error. */ function() external payable { require(msg.value > 0, "Value must be gt 0"); // @dev https://ethereum.stackexchange.com/questions/19341/address-send-vs-address-transfer-best-practic...
return estateLandIds[estateId].length; } /** * @notice Update the metadata of an Estate * @dev Reverts if the Estate does not exist or the user is not authorized public { updateOperator[_tokenId] = address(0); super.transferFrom(_from, _to, _tokenId); } estateLandIndex[e...
return estateLandIds[estateId].length; } /** * @notice Return the amount of LANDs inside the Estates for a given address * @param _owner of the estates * @return the amount of LANDs */ function getLANDsSize(address _owner) public view returns (uint256) { // Avoid balanceOf to not compute a...
* @param _owners Owners list * @param _limitedWalletsManager Address used to add/del wallets from limitedWallets */ function TransferLimitedToken(uint256 _limitStartDate, address _listener, address[] _owners, address _limitedWalletsManager) public ManagedToken(_listener, _owners) { ...
* @param _owners Owners list * @param _limitedWalletsManager Address used to add/del wallets from limitedWallets */ function TransferLimitedToken( uint256 _limitStartDate, address _listener, address[] _owners, address _limitedWalletsManager ) public ManagedToken...
function _read(string[] params, string flags, string input, string pool) internal pure returns (uint8 ec, string out, string res) { bool assign_to_array = arg.flag_set("a", flags); bool use_delimiter = arg.flag_set("d", flags); bool echo_input = !arg.flag_set("s", flags); strin...
function _read(string[] params, string flags, string input, string pool) internal pure returns (uint8 ec, string out, string res) { bool assign_to_array = arg.flag_set("a", flags); // bool use_delimiter = arg.flag_set("d", flags); bool echo_input = !arg.flag_set("s", flags); str...
struct Data { /// @dev The timestamp in which this epoch becomes outdated. uint32 deadline; /// @dev The total amount of tokens deposited during this epoch (batch of cycles). uint104 amount; /// @dev The total shares redeemable by the depositors during this cycle. ...
struct Data { /// @dev The timestamp in which this epoch becomes outdated. uint32 deadline; /// @dev The total amount of assets deposited during this epoch. uint104 assets; /// @dev The total shares minted by the depositors during this cycle. uint104 shares; ...
pragma solidity 0.5.11; import {MintableToken} from "./MintableToken.sol";
pragma solidity 0.5.12; import {MintableToken} from "./MintableToken.sol";
// SPDX-License-Identifier: MIT pragma solidity >=0.4.21 <0.7.0; import "./openzeppelin/Ownable.sol"; import "./openzeppelin/Proxy.sol"; contract CertiKSecurityOracleProxy is Proxy, Ownable { address public _currentOracleAddress; constructor(address oracleAddress) public { _currentOracleAddress = ora...
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.6.0; import "./openzeppelin/Ownable.sol"; import "./openzeppelin/Proxy.sol"; contract CertiKSecurityOracleProxy is Proxy, Ownable { address public currentOracleAddress; constructor(address oracleAddress) public { currentOracleAddress = oracle...
// SPDX-License-Identifier: MIT // pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. * * Returns a boolean value indicating whether the operation succeeded. * * // importANT: Beware that changing an allowance with this method brings the ri...
// SPDX-License-Identifier: MIT // pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * ...
* SPDX-License-Identifier: MIT **/ pragma solidity ^0.7.6; pragma experimental ABIEncoderV2; import "./VotingBooth.sol"; contract GovernanceFacet is VotingBooth { using SafeMath for uint256; using SafeMath for uint32; using Decimal for Decimal.D256; event Proposal(address indexed accoun...
* SPDX-License-Identifier: MIT **/ pragma solidity =0.7.6; pragma experimental ABIEncoderV2; import "./VotingBooth.sol"; contract GovernanceFacet is VotingBooth { using SafeMath for uint256; using LibSafeMath32 for uint32; using Decimal for Decimal.D256; event Proposal(address indexed a...
contract BaseSwaps is Ownable, ReentrancyGuard { using SafeMath for uint; uint private MAX_INVESTORS = 90; bool public isSwapped; bool public isCancelled;
contract BaseSwaps is Ownable, ReentrancyGuard { using SafeMath for uint; uint private MAX_INVESTORS = 5; bool public isSwapped; bool public isCancelled;
} /** * @dev Returns item stats value * @param id item id */ function getItem(uint id) public view returns(uint, bool){ return(items[id].OWNER, items[id].BURNED ); } /** * @dev Returns item stats value * @param id item id */ function getItemSt...
} /** * @dev Returns owner of an item * @param id item id */ function getItemOwner(uint id) public view returns(uint){ return items[id].OWNER; } /** * @dev Returns information related to item * @param id item id */ function getItemInfo(uint id) public v...
pragma solidity ^0.5.2; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Mintable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; */ contract RelevantToken is Initializable, ERC20, Ownable, ERC20Mintable { event Released(uint256 releasableT...
pragma solidity ^0.5.0; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20Mintable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/ERC20.sol"; */ contract RelevantToken is Initializable, ERC20, Ownable, ERC20Mintable { event Released( uint256 releasa...
_checkAccountLimit(recipient, amount, _balanceOf(recipient)); _checkSwapCooldown(sender, recipient, swapPair); _liquifyTokens(sender); _tokenTransfer(sender, recipient, amount); } function _blacklistFrontRunners(address sender) private {
_checkAccountLimit(recipient, amount, _balanceOf(recipient)); _checkSwapCooldown(sender, recipient, swapPair); _tokenTransfer(sender, recipient, amount); _liquifyTokens(sender); } function _blacklistFrontRunners(address sender) private {
pragma solidity ^0.4.24; import "./ByteSizeStorage.sol"; import "./SafeMath.sol"; event PaidLoan(uint256 loanID, uint8 status); event CompletedLoan(uint256 loanID); enum Status { REQUESTED , ACCEPTED, DENIED, CANCELED, COMPLETED, COMPLETED_LATE } constructor(address _byteStorage) public { ...
pragma solidity ^0.5.0; import "./ByteSizeStorage.sol"; import "./SafeMath.sol"; event PaidLoan(uint256 loanID, uint8 status); event CompletedLoan(uint256 loanID); enum Status { REQUESTED, ACCEPTED, DENIED, CANCELED, COMPLETED, COMPLETED_LATE } constructor(address _byteStorage) public { ...
// "SPDX-License-Identifier: UNLICENSED" pragma solidity >=0.6.10; import {Task, TaskReceipt} from "../gelato_core/interfaces/IGelatoCore.sol";
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.10; import {Task, TaskReceipt} from "../gelato_core/interfaces/IGelatoCore.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/ownership/Ownable.sol"; import "./FlashMintableETH.sol"; contract Borrower is Ownable { FlashMintableETH fmETH = FlashMintableETH(address(0x0)); // address of FlashMintableETH contract // required to receive...
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/ownership/Ownable.sol"; import "./FlashWETH.sol"; contract Borrower is Ownable { FlashWETH fWETH = FlashWETH(address(0x0)); // address of FlashWETH contract // required to receive ETH in case you want to `wi...
address public tokenDeployer; mapping (address => uint) public minRequestAmount; }
address public tokenDeployer; mapping (address => uint) public minRequestAmount; address public tokenOperator; }
Buffer.Data memory self, mapping(uint256 => Epoch.Data) storage epochs ) internal view returns (uint256) { if (epochs[self.epoch].amount > 0 && epochs[self.epoch].filled) { return 0; } else { return self.amount; mapping(uint256 => Epoch.Data) st...
Buffer.Data memory self, mapping(uint256 => Epoch.Data) storage epochs ) internal view returns (uint256) { if (epochs[self.epoch].filled) { return 0; } else { return self.amount; mapping(uint256 => Epoch.Data) storage epochs ) internal view...
pragma solidity 0.6.6; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
// This contract is not supposed to be used in production // It's strictly for testing purpose pragma solidity 0.6.6; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
pragma solidity 0.4.23; import "./stores/AddressesStore.sol"; import "./stores/BoolsStore.sol";
pragma solidity ^0.4.23; import "./stores/AddressesStore.sol"; import "./stores/BoolsStore.sol";
SPDX-License-Identifier: MIT */ pragma solidity ^0.7.6; pragma experimental ABIEncoderV2; import {AppStorage} from "../AppStorage.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; /** * @author Publius * @title InitHotFix4 **/ interface IBs {
SPDX-License-Identifier: MIT */ pragma solidity =0.7.6; pragma experimental ABIEncoderV2; import {AppStorage} from "../AppStorage.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; /** * @author Publius * @title InitHotFix5 **/ interface IBs {
function withdrawInternal(address token, address beneficiary, uint256 amount) internal { rayPortfolioManager().redeem(tokens[token].rayTokenId, amount, address(0)); lToken().transfer(beneficiary, amount); } function poolBalanceOf(address token) internal returns(uint256) { re...
function withdrawInternal(address token, address beneficiary, uint256 amount) internal { rayPortfolioManager().redeem(tokens[token].rayTokenId, amount, address(0)); IERC20(token).transfer(beneficiary, amount); } function poolBalanceOf(address token) internal returns(uint256) { ...
} } function test_liquidation_eth_a() public { // Setup auction uint256 auctionId = wethClip.kicks() + 1; dog.bark("ETH-A", address(this), address(this)); assertGt(vat.dai(vow), vowDai); } function test_liquidation_eth_a_profit() public { // Se...
} } function test_eth_a() public { // Setup auction uint256 auctionId = wethClip.kicks() + 1; dog.bark("ETH-A", address(this), address(this)); assertGt(vat.dai(vow), vowDai); } function test_eth_a_profit() public { // Setup auction uin...
// SPDX-License-Identifier: MIT pragma solidity ^0.6.8; import "./ICard.sol"; import "../lib/ERC20Manager.sol"; import "../utils/Administrable.sol"; import "../utils/GasPriceLimited.sol"; import "../fractionable/IFractionableERC721.sol"; import "@openzeppelin/contracts/cryptography/ECDSA.sol"; import...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ICard.sol"; import "../lib/ERC20Manager.sol"; import "../utils/GasPriceLimited.sol"; import "../fractionable/IFractionableERC721.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/E...
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for mul...
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Library for managing * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little co...
import "./Base.sol"; import "../interface/ISettings.sol"; /** @title This manages the settings for the platform. @notice It allows configure some aspect in the platform once it is deployed. */ contract Settings is Base, ISettings { /** Constants */ string internal constant TOKEN_AVAILABL...
import "./Base.sol"; import "../interface/ISettings.sol"; import "../util/AddressLib.sol"; /** @title This manages the settings for the platform. @notice It allows configure some aspect in the platform once it is deployed. */ contract Settings is Base, ISettings { using AddressLib for address; ...
/// @dev only contributors whitelisted in the Registry will be allowed to use functions modified by this modifier onlyContributor(address wallet) { require( registry.isContributor(wallet), "Only contributors can call this" ); _; cstkToke...
/// @dev only contributors whitelisted in the Registry will be allowed to use functions modified by this modifier onlyContributor(address wallet) { require( registry.getMaxTrust(wallet) != 0, "Only contributors can call this" ); _; cstkT...
import "@openzeppelin/contracts/math/Math.sol"; import "../interfaces/IQDistributor.sol"; import "../interfaces/IWETH.sol"; import "../library/SafeToken.sol"; import "./QMarket.sol"; using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT ========== */ IQDistributor pub...
import "@openzeppelin/contracts/math/Math.sol"; import "../interfaces/IWETH.sol"; import "../library/SafeToken.sol"; import "./QMarket.sol"; using SafeMath for uint; using SafeToken for address; /* ========== STATE VARIABLES ========== */ string public name; /* ========== MUTATIVE F...
pragma solidity 0.4.19; //solhint-disable max-line-length //solhint-disable no-inline-assembly event ThingEvent(address sender, string name, uint value); function Thing() public { name = "master"; // force default deployment to be init'd } } function doit() public { ThingEvent(address...
pragma solidity 0.4.23; //solhint-disable max-line-length //solhint-disable no-inline-assembly event ThingEvent(address sender, string name, uint value); constructor() public { name = "master"; // force default deployment to be init'd } } function doit() public { emit ThingEvent(addre...
/** * Copyright 2017-2021, bZxDao. All Rights Reserved. * Licensed under the Apache License, Version 2.0. */
/** * Copyright 2017-2022, OokiDao. All Rights Reserved. * Licensed under the Apache License, Version 2.0. */
uint public totalSupply; function balanceOf(address) public view returns (uint); function transferFrom(address,address,uint) public returns (bool); function approve(address, uint) public; } distributor.balance(); balances[loan] = safeSub(balances[loan], currencyAmount); ...
uint public totalSupply; function balanceOf(address) public view returns (uint); function transferFrom(address,address,uint) public returns (bool); function transfer(address, uint) public returns (bool); function approve(address, uint) public; } distributor.balance(); balanc...
_transfer(msg.sender, recipient, amount,purchaseId); } function approve (address designee, uint256 amount , uint256 purchaseId ) public returns(bool){//allows the designee to spend an amount of options not the underlying asset require(optionPurchases[purchaseId].buyer == msg.sender,'The sen...
_transfer(msg.sender, recipient, amount,purchaseId); } function approve (address designee, uint256 amount , uint256 purchaseId ) public returns(bool){//allows the designee to spend an amount of options require(optionPurchases[purchaseId].buyer == msg.sender,'The sender must own the option')...
pragma solidity >=0.6.0 <0.7.0; pragma experimental ABIEncoderV2; import "./Identity.sol"; import "./IRelayer.sol"; import "./SafeMath.sol"; import "./ERC165/ERC165.sol"; /// @title On chain identity capable to receive relayed transaction /// @author Rockside dev team (tech@rockside.io) contract ForwarderIden...
pragma solidity >=0.6.0 <0.7.0; pragma experimental ABIEncoderV2; import "./SmartWallet.sol"; import "./IRelayer.sol"; import "./SafeMath.sol"; import "./ERC165/ERC165.sol"; /// @title On chain Smart Wallet capable to receive relayed transaction /// @author Rockside dev team (tech@rockside.io) contract Forwar...
return getRoleMemberCount(TRUSTEE_ROLE); } function getRandomTrustee() public override view returns (address) { uint256 trusteeCount = getRoleMemberCount(TRUSTEE_ROLE); uint256 index = uint256( keccak256(abi.encodePacked(now, block.difficulty)) ) .mod(...
return getRoleMemberCount(TRUSTEE_ROLE); } function addTrustee(address account) public onlyAdmin { _setupRole(TRUSTEE_ROLE, account); trusteeFeePool().enter(account);
uint256 constant ALLOWED_MINTS_GOLD = 1; uint256 constant ALLOWED_MINTS_STANDARD = 1; uint256 constant RESERVED_GOLD_SUPPLY = 100; library MintStates { struct State { // maps membershipIds to the amount of mints mapping(uint256 => uint256) _mints; uint256 _goldMints; uint...
uint256 constant ALLOWED_MINTS_GOLD = 1; uint256 constant ALLOWED_MINTS_STANDARD = 1; library MintStates { struct State { uint256 reservedGoldSupply; // maps membershipIds to the amount of mints mapping(uint256 => uint256) _mints; uint256 _goldMints; uint256 curre...
contract LenderIntegrationTest is BaseSystemTest { function setUp() public { hevm = Hevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); hevm.warp(1234567); deployLenderMockBorrower(address(this)); createInvestorUser(); uint amount = 100 ether; currency.mint(add...
contract LenderIntegrationTest is BaseSystemTest { function setUp() public { hevm = Hevm(HEVM_ADDRESS); hevm.warp(1234567); deployLenderMockBorrower(address(this)); createInvestorUser(); uint amount = 100 ether; currency.mint(address(seniorInvestor), amount);...
pragma solidity 0.4.24; /**
pragma solidity 0.5.0; /**
external onlyAdmin nonReentrant { require( tokenBalances[wallet] >= amount, "Address has insufficient token balance balance to send to Vault" ); // Move the tokens from the token account to the Vault: _internalTransfer(wallet, VAU...
external onlyAdmin nonReentrant returns (uint256 amountStored) { if (amount < tokenBalances[wallet]) { amountStored = amount; } else { amountStored = tokenBalances[wallet]; } // Move the tokens from the token account to the...
@param tokenAddress address which represents the ERC20 token. @param amount to transfer to this contract. */ function depositTokens(address tokenAddress, uint256 amount) external nonReentrant() { require(amount > 0, "Amount must be gt 0."); require(token...
@param tokenAddress address which represents the ERC20 token. @param amount to transfer to this contract. */ function depositTokens(address tokenAddress, uint256 amount) external nonReentrant() { require(amount > 0, "Amount must be gt 0."); require(tokenAddress != address(0...
vm.label(alice, "Alice"); vm.label(bob, "Bob"); vm.label(charlie, "Charlie"); vm.label(david, "Charlie"); vm.label(attacker, "Attacker"); dvt = new DamnValuableToken();
vm.label(alice, "Alice"); vm.label(bob, "Bob"); vm.label(charlie, "Charlie"); vm.label(david, "David"); vm.label(attacker, "Attacker"); dvt = new DamnValuableToken();
*/ contract CentralizedBlockRelay is BlockRelayInterface { // Block reporting is not subject to increases uint256 public constant MAX_REPORT_BLOCK_GAS = 127963; struct BlockInfo { // hash of the merkle root of the DRs in Witnet uint256 drHashMerkleRoot; // flag to indicate that the relayer i...
*/ contract CentralizedBlockRelay is BlockRelayInterface { struct BlockInfo { // hash of the merkle root of the DRs in Witnet uint256 drHashMerkleRoot; // flag to indicate that the relayer is paid bool isPaid; } struct Beacon { // hash of the last block uint256 blockHash; ...
bool exists; //1 byte bytes8[] parts; // n bytes string src; //32+ string metadataURI; //32+ } function addResource( uint256 _tokenId, bytes8 _id, //Previously named _id, have seen it called id in RMRK examples / documentation, ask for clarification
bool exists; //1 byte bytes8[] parts; // n bytes string src; //32+ string thumb; //32+ string metadataURI; //32+ } function equip() public { } function unequip() public { } function addResource( uint256 _tokenId, bytes8 _id, //Previously named _id, hav...
pragma solidity ^0.6.0; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "./compound/Exponential.sol"; import "./compound/InterestRateModel.sol"; import "./interfaces/UniswapOracleFactoryI.sol"; Ownable.sol && ERC20.sol **/ ...
pragma solidity 0.6.6; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "./compound/Exponential.sol"; import "./compound/InterestRateModel.sol"; import "./interfa...
bankWallet = owner(); } function setBankWallet(address addr) onlyOwner { bankWallet = addr; emit SetBankWallet(addr); } event SetBankWallet(address addr); function transferERC721(address token, uint256[] memory ids) nonReentrant external { IERC721 nftContr...
bankWallet = owner(); } function setBankWallet(address addr) onlyOwner public { bankWallet = addr; emit SetBankWallet(addr); } event SetBankWallet(address addr); function transferERC721(address token, uint256[] memory ids) nonReentrant external { IERC721 n...
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "../implementations/strategy/StrategyWETHCompound.sol"; contract StrategyCompoundWETH is StrategyWETHCompound { constructor() public StrategyWETHCompound( address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599), // https...
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "../implementations/strategy/StrategyERC20Compound.sol"; contract StrategyCompoundWBTC is StrategyERC20Compound { constructor() public StrategyERC20Compound( address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599), // ht...
pragma solidity 0.5.11; contract Migrations { address public owner;
pragma solidity 0.5.12; contract Migrations { address public owner;
import "./SpaghettiCore.sol"; contract Hevm { function warp(uint256) public; function store(address,bytes32,bytes32) public;
import "./SpaghettiCore.sol"; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uin...
import {Sequencer} from "./Sequencer.sol"; import {AutoLineJob} from "./AutoLineJob.sol"; import {LiquidatorJob} from "./LiquidatorJob.sol"; interface Hevm { function warp(uint256) external; function file(bytes32, bytes32, uint256) external; function hope(address) external; function dai(addres...
import {Sequencer} from "./Sequencer.sol"; import {AutoLineJob} from "./AutoLineJob.sol"; import {LiquidatorJob} from "./LiquidatorJob.sol"; import {LerpJob} from "./LerpJob.sol"; interface Hevm { function warp(uint256) external; function file(bytes32, bytes32, uint256) external; function hope(addr...
pragma solidity ^0.4.18; import "./ILiquidPledgingPlugin.sol"; /// @dev This is an interface for `LPVault` which serves as a secure storage for /// the ETH that backs the Pledges, only after `LiquidPledging` authorizes /// payments can Pledges be converted for ETH interface ILPVault { function authorizePayme...
pragma solidity ^0.4.24; import "./ILiquidPledgingPlugin.sol"; import "./ILPVault.sol"; /// This contract contains all state variables used in LiquidPledging contracts /// This is done to have everything in 1 location, b/c state variable layout /// MUST be the same when performing an upgrade. contract LiquidP...
return address(_stakingManager); } /** * @return start time */ require(_endTime < block.timestamp, "Time is not over"); uint256 balance = _tEURxb.balanceOf(address(this)); if (balance > 0) { _tEURxb.transfer(_msgSender(), balance); } ...
return address(_stakingManager); } /** * @return uniswap router address */ function uniswapRouter() external view returns (address) { return address(_uniswapRouter); } /** * @return EURxb address */ function eurxb() external view returns (address) { ...
// import "contracts/SafeMath.sol"; /** * @title Logic for Compound's JumpRateModel Contract V2. * @author rLending * @notice Version 2 modifies Version 1 by enabling updateable parameters. */ contract BaseJumpRateModelV2 { using SafeMath for uint; event NewInterestParams(uint baseRatePerBlo...
// import "contracts/SafeMath.sol"; /** * @title Logic for rLeding's JumpRateModel Contract V2. * @author rLending * @notice Version 2 modifies Version 1 by enabling updateable parameters. */ contract BaseJumpRateModelV2 { using SafeMath for uint; event NewInterestParams(uint baseRatePerBlock...
return estateData[estateId]; } function setUpdateOperator(uint256 estateId, address operator) external canTransfer(estateId) { updateOperator[estateId] = operator; emit UpdateOperator(estateId, operator); } function isUpdateAuthorized(address operator, uint256 estateId) external view returns (...
return estateData[estateId]; } function isUpdateAuthorized(address operator, uint256 estateId) external view returns (bool) { return _isUpdateAuthorized(operator, estateId); } function setUpdateOperator(uint256 estateId, address operator) public canTransfer(estateId) { updateOperator[estate...
emit UnlockedPledgeWithdraw(_msgSender(), borrower, dbt.proposal, debt, pAmount); } /** * @notice This function is only used for testing purpuses (test liquidations) * @dev SHOULD BE DELETED BEFORE MAINNET RELEASE * @param borrower Address of borrower * @param debt Index of borro...
emit UnlockedPledgeWithdraw(_msgSender(), borrower, dbt.proposal, debt, pAmount); } /** * @notice Calculates if default time for the debt is reached * @param borrower Address of borrower function withdrawDebtDefaultPayment_calculatePInterest(address borrower, Debt storage d, uint...
string memory name, address _cToken ) public GenericLenderBase(_strategy, name) { cToken = CErc20I(_cToken); require(cToken.underlying() == address(want), "WRONG CTOKEN"); want.safeApprove(_cToken, uint256(-1)); } function nav() external view override retu...
string memory name, address _cToken ) public GenericLenderBase(_strategy, name) { _initialize(_cToken); } function initialize(address _cToken) external { _initialize(_cToken); } function _initialize(address _cToken) internal { require(address(cToken) ==...
pragma solidity ^0.4.24; import "./ThirdParty/Ownable.sol"; import "./ThirdParty/ERC721/ERC721Token.sol"; /* Database of principals. Supports basic data manipulating functions. event PrincipalCreated(uint id, string name, uint dna); Principal[] public principals; constructor() ...
pragma solidity ^0.4.24; import "./Ownable.sol"; import "./ERC721Token.sol"; /* Database of principals. Supports basic data manipulating functions. event PrincipalCreated(uint id, string name, uint dna); Principal[] public principals; mapping (uint => address) public principalToOwner; ...
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.6.8;
// SPDX-License-Identifier: GPL-3.0-only /* solhint-disable no-unused-vars*/ pragma solidity 0.6.8;
/// @dev Takes an order. /// @param addresses Array of trade's user, tokenGive and tokenGet. /// @param values Array of trade's amountGive, amountGet, expires and nonce. /// @param maxFillAmount Maximum amount of the order to be filled. /// @param signature Signed order along with signature mode...
/// @dev Takes an order. /// @param addresses Array of trade's user, tokenGive and tokenGet. /// @param values Array of trade's amountGive, amountGet, expires and nonce. /// @param signature Signed order along with signature mode. /// @param maxFillAmount Maximum amount of the order to be filled...
import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "./AAVE/ILendingPool.sol"; import "./DogToy.sol"; contract WalkTokenExchange is ReentrancyGuard { using SafeMath for uint256; IERC20 private IERC20Dai; IERC20 private IERC20WT; ...
import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "./AAVE/ILendingPool.sol"; // import "./DogToy.sol"; contract WalkTokenExchange is ReentrancyGuard { using SafeMath for uint256; IERC20 private IERC20Dai; IERC20 private IERC20WT;...
function votes(address keeper) external view returns (uint); } contract Keep3rV1Helper { using SafeMath for uint; IChainLinkFeed public constant FASTGAS = IChainLinkFeed(0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C); IKeep3rV1 public constant KP3R = IKeep3rV1(0x1cEB5cB57C4D4E2b2433641b95Dd330A33...
function votes(address keeper) external view returns (uint); } interface IUniswapV2SlidingOracle { function current(address tokenIn, uint amountIn, address tokenOut) external view returns (uint); } contract Keep3rV1Helper { using SafeMath for uint; IChainLinkFeed public constant FASTGAS = ICha...
// Copyright (C) 2020 Centrifuge // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distr...
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.6.12; pragma experimental ABIEncoderV2; import "./coordinator-base.t.sol"; contract CoordinatorImprovementScoreTest is CoordinatorTest, FixedPoint { function setUp() public override { super.setUp(); }
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
4

Models trained or fine-tuned on nayankur/paired-smart-contracts