More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FeeDistributor
Compiler Version
v0.7.1+commit.f4a555be
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.1; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; contract FeeDistributor is Ownable { using SafeMath for uint; IERC20 public R3Ttoken; address public liquidVault; address public secondaryAddress; uint256 public secondaryAddressShare; bool public initialized; modifier seeded { require( initialized, "R3T: Fees cannot be distributed until Distributor seeded." ); _; } function seed(address r3t, address vault, address _secondaryAddress, uint256 _secondaryAddressShare) public onlyOwner { R3Ttoken = IERC20(r3t); liquidVault = vault; secondaryAddress = _secondaryAddress; secondaryAddressShare = _secondaryAddressShare; initialized = true; } // sends fees to the liquid vault, secondary address and percentage can be configured function distributeFees() public seeded { uint balance = R3Ttoken.balanceOf(address(this)); uint256 fees; if (secondaryAddressShare > 0) { fees = secondaryAddressShare.mul(balance).div(100); require( R3Ttoken.transfer(secondaryAddress, fees), "FeeDistributor: transfer to the secondary address failed" ); } require( R3Ttoken.transfer(liquidVault, balance.sub(fees)), "FeeDistributor: transfer to LiquidVault failed" ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class 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) { 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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"R3Ttoken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondaryAddressShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"r3t","type":"address"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"_secondaryAddress","type":"address"},{"internalType":"uint256","name":"_secondaryAddressShare","type":"uint256"}],"name":"seed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6109cc8061007d6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b446245311610066578063b446245314610131578063bb57ad2014610139578063ead3754914610141578063f2fde38b1461015b578063f851d0d3146101815761009e565b8063158ef93e146100a35780633438298e146100bf578063715018a6146100fd5780638da5cb5b14610105578063944a1a2314610129575b600080fd5b6100ab610189565b604080519115158252519081900360200190f35b6100fb600480360360808110156100d557600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610192565b005b6100fb61024e565b61010d610302565b604080516001600160a01b039092168252519081900360200190f35b61010d610311565b61010d610320565b6100fb61032f565b6101496105ab565b60408051918252519081900360200190f35b6100fb6004803603602081101561017157600080fd5b50356001600160a01b03166105b1565b61010d6106bb565b60055460ff1681565b61019a6106ca565b6000546001600160a01b039081169116146101fc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600180546001600160a01b03199081166001600160a01b03968716178255600280548216958716959095179094556003805490941692909416919091179091556004556005805460ff19169091179055565b6102566106ca565b6000546001600160a01b039081169116146102b8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001546001600160a01b031681565b6003546001600160a01b031681565b60055460ff166103705760405162461bcd60e51b81526004018080602001828103825260398152602001806108f86039913960400191505060405180910390fd5b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156103bb57600080fd5b505afa1580156103cf573d6000803e3d6000fd5b505050506040513d60208110156103e557600080fd5b5051600454909150600090156104d757610415606461040f846004546106ce90919063ffffffff16565b90610730565b6001546003546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561047057600080fd5b505af1158015610484573d6000803e3d6000fd5b505050506040513d602081101561049a57600080fd5b50516104d75760405162461bcd60e51b815260040180806020018281038252603881526020018061095f6038913960400191505060405180910390fd5b6001546002546001600160a01b039182169163a9059cbb91166104fa8585610772565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561054057600080fd5b505af1158015610554573d6000803e3d6000fd5b505050506040513d602081101561056a57600080fd5b50516105a75760405162461bcd60e51b815260040180806020018281038252602e815260200180610931602e913960400191505060405180910390fd5b5050565b60045481565b6105b96106ca565b6000546001600160a01b0390811691161461061b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106605760405162461bcd60e51b81526004018080602001828103825260268152602001806108b16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b3390565b6000826106dd5750600061072a565b828202828482816106ea57fe5b04146107275760405162461bcd60e51b81526004018080602001828103825260218152602001806108d76021913960400191505060405180910390fd5b90505b92915050565b600061072783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506107b4565b600061072783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610856565b600081836108405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108055781810151838201526020016107ed565b50505050905090810190601f1680156108325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161084c57fe5b0495945050505050565b600081848411156108a85760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108055781810151838201526020016107ed565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775233543a20466565732063616e6e6f7420626520646973747269627574656420756e74696c204469737472696275746f72207365656465642e4665654469737472696275746f723a207472616e7366657220746f204c69717569645661756c74206661696c65644665654469737472696275746f723a207472616e7366657220746f20746865207365636f6e646172792061646472657373206661696c6564a264697066735822122007a857db1b8c86cc06ef3a9ffedbe97ae126f0666bae15e9fe1e8f682003bada64736f6c63430007010033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b446245311610066578063b446245314610131578063bb57ad2014610139578063ead3754914610141578063f2fde38b1461015b578063f851d0d3146101815761009e565b8063158ef93e146100a35780633438298e146100bf578063715018a6146100fd5780638da5cb5b14610105578063944a1a2314610129575b600080fd5b6100ab610189565b604080519115158252519081900360200190f35b6100fb600480360360808110156100d557600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610192565b005b6100fb61024e565b61010d610302565b604080516001600160a01b039092168252519081900360200190f35b61010d610311565b61010d610320565b6100fb61032f565b6101496105ab565b60408051918252519081900360200190f35b6100fb6004803603602081101561017157600080fd5b50356001600160a01b03166105b1565b61010d6106bb565b60055460ff1681565b61019a6106ca565b6000546001600160a01b039081169116146101fc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600180546001600160a01b03199081166001600160a01b03968716178255600280548216958716959095179094556003805490941692909416919091179091556004556005805460ff19169091179055565b6102566106ca565b6000546001600160a01b039081169116146102b8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001546001600160a01b031681565b6003546001600160a01b031681565b60055460ff166103705760405162461bcd60e51b81526004018080602001828103825260398152602001806108f86039913960400191505060405180910390fd5b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156103bb57600080fd5b505afa1580156103cf573d6000803e3d6000fd5b505050506040513d60208110156103e557600080fd5b5051600454909150600090156104d757610415606461040f846004546106ce90919063ffffffff16565b90610730565b6001546003546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561047057600080fd5b505af1158015610484573d6000803e3d6000fd5b505050506040513d602081101561049a57600080fd5b50516104d75760405162461bcd60e51b815260040180806020018281038252603881526020018061095f6038913960400191505060405180910390fd5b6001546002546001600160a01b039182169163a9059cbb91166104fa8585610772565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561054057600080fd5b505af1158015610554573d6000803e3d6000fd5b505050506040513d602081101561056a57600080fd5b50516105a75760405162461bcd60e51b815260040180806020018281038252602e815260200180610931602e913960400191505060405180910390fd5b5050565b60045481565b6105b96106ca565b6000546001600160a01b0390811691161461061b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106605760405162461bcd60e51b81526004018080602001828103825260268152602001806108b16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b3390565b6000826106dd5750600061072a565b828202828482816106ea57fe5b04146107275760405162461bcd60e51b81526004018080602001828103825260218152602001806108d76021913960400191505060405180910390fd5b90505b92915050565b600061072783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506107b4565b600061072783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610856565b600081836108405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108055781810151838201526020016107ed565b50505050905090810190601f1680156108325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161084c57fe5b0495945050505050565b600081848411156108a85760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108055781810151838201526020016107ed565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775233543a20466565732063616e6e6f7420626520646973747269627574656420756e74696c204469737472696275746f72207365656465642e4665654469737472696275746f723a207472616e7366657220746f204c69717569645661756c74206661696c65644665654469737472696275746f723a207472616e7366657220746f20746865207365636f6e646172792061646472657373206661696c6564a264697066735822122007a857db1b8c86cc06ef3a9ffedbe97ae126f0666bae15e9fe1e8f682003bada64736f6c63430007010033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.02793 | 42,437.6269 | $1,185.3 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.