More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,248 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 53028418 | 446 days ago | IN | 0 POL | 0.00263157 | ||||
Withdraw | 53028389 | 446 days ago | IN | 0 POL | 0.0051381 | ||||
Withdraw | 53028365 | 446 days ago | IN | 0 POL | 0.00407271 | ||||
Withdraw | 53028341 | 446 days ago | IN | 0 POL | 0.00323202 | ||||
Withdraw | 53028328 | 446 days ago | IN | 0 POL | 0.00366459 | ||||
Route | 53007925 | 446 days ago | IN | 0 POL | 0.00488444 | ||||
Route | 53003054 | 446 days ago | IN | 62.173 POL | 0.04111121 | ||||
Route | 52940785 | 448 days ago | IN | 309.627 POL | 0.00589248 | ||||
Route | 52903484 | 449 days ago | IN | 307.203 POL | 0.0070254 | ||||
Route | 52837054 | 451 days ago | IN | 0 POL | 0.00610234 | ||||
Route | 52824132 | 451 days ago | IN | 318.0387 POL | 0.00503625 | ||||
Route | 52706428 | 454 days ago | IN | 480.341 POL | 0.00368396 | ||||
Route | 52661023 | 455 days ago | IN | 0 POL | 0.03866401 | ||||
Route | 52555750 | 458 days ago | IN | 322.569 POL | 0.00542317 | ||||
Route | 52371891 | 463 days ago | IN | 11.888 POL | 0.00526869 | ||||
Route | 52366926 | 463 days ago | IN | 295.516 POL | 0.00526905 | ||||
Route | 52296894 | 465 days ago | IN | 0 POL | 0.00325884 | ||||
Route | 52257287 | 466 days ago | IN | 291.927 POL | 0.00526941 | ||||
Route | 52253501 | 466 days ago | IN | 290.0294 POL | 0.00504238 | ||||
Route | 52054561 | 471 days ago | IN | 30.368 POL | 0.00495695 | ||||
Route | 52054501 | 471 days ago | IN | 24.294 POL | 0.00526911 | ||||
Route | 52054483 | 471 days ago | IN | 24.294 POL | 0.00559175 | ||||
Route | 51946421 | 474 days ago | IN | 0 POL | 0.00875094 | ||||
Route | 51902345 | 475 days ago | IN | 292.279 POL | 0.03971498 | ||||
Route | 51876884 | 476 days ago | IN | 256.698 POL | 0.0196392 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
53028418 | 446 days ago | 3.55138238 POL | ||||
53003054 | 446 days ago | 62.173 POL | ||||
52940785 | 448 days ago | 309.627 POL | ||||
52903484 | 449 days ago | 307.203 POL | ||||
52824132 | 451 days ago | 318.0387 POL | ||||
52706428 | 454 days ago | 7.205115 POL | ||||
52706428 | 454 days ago | 473.135885 POL | ||||
52555750 | 458 days ago | 322.569 POL | ||||
52371891 | 463 days ago | 11.888 POL | ||||
52366926 | 463 days ago | 295.516 POL | ||||
52257287 | 466 days ago | 291.927 POL | ||||
52253501 | 466 days ago | 290.0294 POL | ||||
52054561 | 471 days ago | 30.368 POL | ||||
52054501 | 471 days ago | 24.294 POL | ||||
52054483 | 471 days ago | 24.294 POL | ||||
51902345 | 475 days ago | 292.279 POL | ||||
51876884 | 476 days ago | 256.698 POL | ||||
51708658 | 480 days ago | 255.287 POL | ||||
51666140 | 481 days ago | 247.93 POL | ||||
51651914 | 481 days ago | 0.00966 POL | ||||
51623191 | 482 days ago | 232.749 POL | ||||
51621376 | 482 days ago | 223.434 POL | ||||
51621163 | 482 days ago | 9.611 POL | ||||
51413704 | 488 days ago | 305.213 POL | ||||
51404357 | 488 days ago | 12.293 POL |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
DePayRouterV1
Compiler Version
v0.8.14+commit.80d49f37
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2022-05-21 */ // Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol // SPDX-License-Identifier: MIT // pragma solidity ^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); } // Dependency file: @openzeppelin/contracts/utils/math/SafeMath.sol // pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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) { return a + b; } /** * @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 a - b; } /** * @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) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting 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) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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) { unchecked { require(b > 0, errorMessage); return a % b; } } } // Dependency file: @openzeppelin/contracts/utils/Address.sol // pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // Dependency file: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol // pragma solidity ^0.8.0; // import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // import "@openzeppelin/contracts/utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // Dependency file: contracts/interfaces/IDePayRouterV1Plugin.sol // pragma solidity >=0.8.6 <0.9.0; interface IDePayRouterV1Plugin { function delegate() external returns(bool); function execute( address[] calldata path, uint[] calldata amounts, address[] calldata addresses, string[] calldata data ) external payable returns(bool); } // Dependency file: contracts/libraries/Helper.sol // pragma solidity >=0.8.6 <0.9.0; // Helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library Helper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'Helper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'Helper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'Helper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'Helper::safeTransferETH: ETH transfer failed'); } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // Dependency file: @openzeppelin/contracts/utils/Context.sol // pragma solidity ^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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // Dependency file: @openzeppelin/contracts/access/Ownable.sol // pragma solidity ^0.8.0; // import "@openzeppelin/contracts/utils/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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual 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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // Dependency file: contracts/DePayRouterV1Configuration.sol // pragma solidity >=0.8.6 <0.9.0; pragma abicoder v2; // import "@openzeppelin/contracts/access/Ownable.sol"; // Prevents unwanted access to configuration in DePayRouterV1 // Potentially occuring through delegatecall(ing) plugins. contract DePayRouterV1Configuration is Ownable { // List of approved plugins. Use approvePlugin to add new plugins. mapping (address => address) public approvedPlugins; // Approves the provided plugin. function approvePlugin(address plugin) external onlyOwner returns(bool) { approvedPlugins[plugin] = plugin; emit PluginApproved(plugin); return true; } // Event to emit newly approved plugin. event PluginApproved( address indexed pluginAddress ); // Disapproves the provided plugin. function disapprovePlugin(address plugin) external onlyOwner returns(bool) { approvedPlugins[plugin] = address(0); emit PluginDisapproved(plugin); return true; } // Event to emit disapproved plugin. event PluginDisapproved( address indexed pluginAddress ); } // Root file: contracts/DePayRouterV1.sol pragma solidity >=0.8.6 <0.9.0; // import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // import "@openzeppelin/contracts/utils/math/SafeMath.sol"; // import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // import 'contracts/interfaces/IDePayRouterV1Plugin.sol'; // import 'contracts/libraries/Helper.sol'; // import 'contracts/DePayRouterV1Configuration.sol'; contract DePayRouterV1 { using SafeMath for uint; using SafeERC20 for IERC20; // Address representating ETH (e.g. in payment routing paths) address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; // Instance of DePayRouterV1Configuration DePayRouterV1Configuration public immutable configuration; // Pass immutable instance to configuration. // This protects from potential delegatecall and access overlay attacks: // https://github.com/DePayFi/depay-ethereum-payments/blob/master/docs/Audit3.md#H02 constructor ( address _configuration ) { configuration = DePayRouterV1Configuration(_configuration); } // Proxy modifier to DePayRouterV1Configuration modifier onlyOwner() { require(configuration.owner() == msg.sender, "Ownable: caller is not the owner"); _; } receive() external payable { // Accepts ETH payments which is require in order // to swap from and to ETH // especially unwrapping WETH as part of token swaps. } // The main function to route transactions. function route( // The path of the token conversion. address[] calldata path, // Amounts passed to proccessors: // e.g. [amountIn, amountOut, deadline] uint[] calldata amounts, // Addresses passed to plugins: // e.g. [receiver] address[] calldata addresses, // List and order of plugins to be executed for this payment: // e.g. [Uniswap,paymentPlugin] to swap and pay address[] calldata plugins, // Data passed to plugins: // e.g. ["signatureOfSmartContractFunction(address,uint)"] receiving the payment string[] calldata data ) external payable returns(bool) { uint balanceBefore = _balanceBefore(path[path.length-1]); _ensureTransferIn(path[0], amounts[0]); _execute(path, amounts, addresses, plugins, data); _ensureBalance(path[path.length-1], balanceBefore); return true; } // Returns the balance for a token (or ETH) before the payment is executed. // In case of ETH we need to deduct what has been payed in as part of the transaction itself. function _balanceBefore(address token) private returns (uint balance) { balance = _balance(token); if(token == ETH) { balance -= msg.value; } } // This makes sure that the sender has payed in the token (or ETH) // required to perform the payment. function _ensureTransferIn(address tokenIn, uint amountIn) private { if(tokenIn == ETH) { require(msg.value >= amountIn, 'DePay: Insufficient amount payed in!'); } else { Helper.safeTransferFrom(tokenIn, msg.sender, address(this), amountIn); } } // Executes plugins in the given order. function _execute( address[] calldata path, uint[] calldata amounts, address[] calldata addresses, address[] calldata plugins, string[] calldata data ) internal { for (uint i = 0; i < plugins.length; i++) { require(_isApproved(plugins[i]), 'DePay: Plugin not approved!'); IDePayRouterV1Plugin plugin = IDePayRouterV1Plugin(configuration.approvedPlugins(plugins[i])); if(plugin.delegate()) { (bool success, bytes memory returnData) = address(plugin).delegatecall(abi.encodeWithSelector( plugin.execute.selector, path, amounts, addresses, data )); require(success, string(returnData)); } else { (bool success, bytes memory returnData) = address(plugin).call(abi.encodeWithSelector( plugin.execute.selector, path, amounts, addresses, data )); require(success, string(returnData)); } } } // This makes sure that the balance after the payment is not less than before. // Prevents draining the contract. function _ensureBalance(address tokenOut, uint balanceBefore) private view { require(_balance(tokenOut) >= balanceBefore, 'DePay: Insufficient balance after payment!'); } // Returns the balance of the payment plugin contract for a token (or ETH). function _balance(address token) private view returns(uint) { if(token == ETH) { return address(this).balance; } else { return IERC20(token).balanceOf(address(this)); } } // Function to check if a plugin address is approved. function isApproved( address pluginAddress ) external view returns(bool){ return _isApproved(pluginAddress); } // Internal function to check if a plugin address is approved. function _isApproved( address pluginAddress ) internal view returns(bool) { return (configuration.approvedPlugins(pluginAddress) != address(0)); } // Allows to withdraw accidentally sent ETH or tokens. function withdraw( address token, uint amount ) external onlyOwner returns(bool) { if(token == ETH) { Helper.safeTransferETH(payable(configuration.owner()), amount); } else { Helper.safeTransfer(token, payable(configuration.owner()), amount); } return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_configuration","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configuration","outputs":[{"internalType":"contract DePayRouterV1Configuration","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pluginAddress","type":"address"}],"name":"isApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"address[]","name":"plugins","type":"address[]"},{"internalType":"string[]","name":"data","type":"string[]"}],"name":"route","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516112c53803806112c583398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516112186100ad6000396000818160a10152818161023b01528181610340015281816103d101528181610484015261065c01526112186000f3fe60806040526004361061004e5760003560e01c8063673448dd1461005a5780636c70bee91461008f5780638322fff2146100db578063b7d29a3514610103578063f3fef3a31461011657600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a610075366004610dae565b610136565b60405190151581526020015b60405180910390f35b34801561009b57600080fd5b506100c37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610086565b3480156100e757600080fd5b506100c373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b61007a610111366004610e1e565b610147565b34801561012257600080fd5b5061007a610131366004610f0f565b61022d565b600061014182610460565b92915050565b6000806101838c8c61015a600182610f51565b81811061016957610169610f68565b905060200201602081019061017e9190610dae565b610500565b90506101cf8c8c600081811061019b5761019b610f68565b90506020020160208101906101b09190610dae565b8b8b60008181106101c3576101c3610f68565b90506020020135610541565b6101e18c8c8c8c8c8c8c8c8c8c6105d2565b61021b8c8c6101f1600182610f51565b81811061020057610200610f68565b90506020020160208101906102159190610dae565b8261095f565b5060019b9a5050505050505050505050565b6000336001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102bb9190610f7e565b6001600160a01b0316146103165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016103cb576103c67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c09190610f7e565b836109ca565b610457565b610457837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610f7e565b84610aa1565b50600192915050565b604051637445e0c360e01b81526001600160a01b03828116600483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690637445e0c390602401602060405180830381865afa1580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef9190610f7e565b6001600160a01b0316141592915050565b600061050b82610bca565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0383160161053c576101413482610f51565b919050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038316016105c657803410156105c25760405162461bcd60e51b8152602060048201526024808201527f44655061793a20496e73756666696369656e7420616d6f756e7420706179656460448201526320696e2160e01b606482015260840161030d565b5050565b6105c282333084610c60565b60005b838110156109525761060c8585838181106105f2576105f2610f68565b90506020020160208101906106079190610dae565b610460565b6106585760405162461bcd60e51b815260206004820152601b60248201527f44655061793a20506c7567696e206e6f7420617070726f766564210000000000604482015260640161030d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637445e0c387878581811061069b5761069b610f68565b90506020020160208101906106b09190610dae565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190610f7e565b9050806001600160a01b031663c89e43616040518163ffffffff1660e01b81526004016020604051808303816000875af115801561075a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077e9190610f9b565b1561086257600080826001600160a01b031663b869495960e01b8f8f8f8f8f8f8d8d6040516024016107b798979695949392919061102f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516107f59190611161565b600060405180830381855af49150503d8060008114610830576040519150601f19603f3d011682016040523d82523d6000602084013e610835565b606091505b509150915081819061085a5760405162461bcd60e51b815260040161030d919061117d565b50505061093f565b600080826001600160a01b031663b869495960e01b8f8f8f8f8f8f8d8d60405160240161089698979695949392919061102f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516108d49190611161565b6000604051808303816000865af19150503d8060008114610911576040519150601f19603f3d011682016040523d82523d6000602084013e610916565b606091505b509150915081819061093b5760405162461bcd60e51b815260040161030d919061117d565b5050505b508061094a816111b0565b9150506105d5565b5050505050505050505050565b8061096983610bca565b10156105c25760405162461bcd60e51b815260206004820152602a60248201527f44655061793a20496e73756666696369656e742062616c616e6365206166746560448201526972207061796d656e742160b01b606482015260840161030d565b604080516000808252602082019092526001600160a01b0384169083906040516109f49190611161565b60006040518083038185875af1925050503d8060008114610a31576040519150601f19603f3d011682016040523d82523d6000602084013e610a36565b606091505b5050905080610a9c5760405162461bcd60e51b815260206004820152602c60248201527f48656c7065723a3a736166655472616e736665724554483a204554482074726160448201526b1b9cd9995c8819985a5b195960a21b606482015260840161030d565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691610afd9190611161565b6000604051808303816000865af19150503d8060008114610b3a576040519150601f19603f3d011682016040523d82523d6000602084013e610b3f565b606091505b5091509150818015610b69575080511580610b69575080806020019051810190610b699190610f9b565b610bc35760405162461bcd60e51b815260206004820152602560248201527f48656c7065723a3a736166655472616e736665723a207472616e736665722066604482015264185a5b195960da1b606482015260840161030d565b5050505050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601610bf8575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014191906111c9565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610cc49190611161565b6000604051808303816000865af19150503d8060008114610d01576040519150601f19603f3d011682016040523d82523d6000602084013e610d06565b606091505b5091509150818015610d30575080511580610d30575080806020019051810190610d309190610f9b565b610d8e5760405162461bcd60e51b815260206004820152602960248201527f48656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726044820152681bdb4819985a5b195960ba1b606482015260840161030d565b505050505050565b6001600160a01b0381168114610dab57600080fd5b50565b600060208284031215610dc057600080fd5b8135610dcb81610d96565b9392505050565b60008083601f840112610de457600080fd5b50813567ffffffffffffffff811115610dfc57600080fd5b6020830191508360208260051b8501011115610e1757600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215610e3d57600080fd5b8a3567ffffffffffffffff80821115610e5557600080fd5b610e618e838f01610dd2565b909c509a5060208d0135915080821115610e7a57600080fd5b610e868e838f01610dd2565b909a50985060408d0135915080821115610e9f57600080fd5b610eab8e838f01610dd2565b909850965060608d0135915080821115610ec457600080fd5b610ed08e838f01610dd2565b909650945060808d0135915080821115610ee957600080fd5b50610ef68d828e01610dd2565b915080935050809150509295989b9194979a5092959850565b60008060408385031215610f2257600080fd5b8235610f2d81610d96565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b600082821015610f6357610f63610f3b565b500390565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610f9057600080fd5b8151610dcb81610d96565b600060208284031215610fad57600080fd5b81518015158114610dcb57600080fd5b8183526000602080850194508260005b85811015610ffb578135610fe081610d96565b6001600160a01b031687529582019590820190600101610fcd565b509495945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b608081526000611043608083018a8c610fbd565b8281036020848101919091528882526001600160fb1b0389111561106657600080fd5b8860051b808b8385013760009201818101838152858203830160408701529092611091828a8c610fbd565b868103606088015287815293508284019150600587901b8401830188825b8981101561111c57868303601f190185528135368c9003601e190181126110d4578485fd5b8b01868101903567ffffffffffffffff8111156110ef578586fd5b8036038213156110fd578586fd5b611108858284611006565b9688019694505050908501906001016110af565b50909f9e505050505050505050505050505050565b60005b8381101561114c578181015183820152602001611134565b8381111561115b576000848401525b50505050565b60008251611173818460208701611131565b9190910192915050565b602081526000825180602084015261119c816040850160208701611131565b601f01601f19169190910160400192915050565b6000600182016111c2576111c2610f3b565b5060010190565b6000602082840312156111db57600080fd5b505191905056fea2646970667358221220ffb774747755e6f7c7e56dbc560576b1e0207606d57b7f27ca0ed6288a5d736864736f6c634300080e00330000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b6780
Deployed Bytecode
0x60806040526004361061004e5760003560e01c8063673448dd1461005a5780636c70bee91461008f5780638322fff2146100db578063b7d29a3514610103578063f3fef3a31461011657600080fd5b3661005557005b600080fd5b34801561006657600080fd5b5061007a610075366004610dae565b610136565b60405190151581526020015b60405180910390f35b34801561009b57600080fd5b506100c37f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b678081565b6040516001600160a01b039091168152602001610086565b3480156100e757600080fd5b506100c373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b61007a610111366004610e1e565b610147565b34801561012257600080fd5b5061007a610131366004610f0f565b61022d565b600061014182610460565b92915050565b6000806101838c8c61015a600182610f51565b81811061016957610169610f68565b905060200201602081019061017e9190610dae565b610500565b90506101cf8c8c600081811061019b5761019b610f68565b90506020020160208101906101b09190610dae565b8b8b60008181106101c3576101c3610f68565b90506020020135610541565b6101e18c8c8c8c8c8c8c8c8c8c6105d2565b61021b8c8c6101f1600182610f51565b81811061020057610200610f68565b90506020020160208101906102159190610dae565b8261095f565b5060019b9a5050505050505050505050565b6000336001600160a01b03167f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b67806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102bb9190610f7e565b6001600160a01b0316146103165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038416016103cb576103c67f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b67806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c09190610f7e565b836109ca565b610457565b610457837f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b67806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610f7e565b84610aa1565b50600192915050565b604051637445e0c360e01b81526001600160a01b03828116600483015260009182917f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b67801690637445e0c390602401602060405180830381865afa1580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef9190610f7e565b6001600160a01b0316141592915050565b600061050b82610bca565b905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0383160161053c576101413482610f51565b919050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b038316016105c657803410156105c25760405162461bcd60e51b8152602060048201526024808201527f44655061793a20496e73756666696369656e7420616d6f756e7420706179656460448201526320696e2160e01b606482015260840161030d565b5050565b6105c282333084610c60565b60005b838110156109525761060c8585838181106105f2576105f2610f68565b90506020020160208101906106079190610dae565b610460565b6106585760405162461bcd60e51b815260206004820152601b60248201527f44655061793a20506c7567696e206e6f7420617070726f766564210000000000604482015260640161030d565b60007f0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b67806001600160a01b0316637445e0c387878581811061069b5761069b610f68565b90506020020160208101906106b09190610dae565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190610f7e565b9050806001600160a01b031663c89e43616040518163ffffffff1660e01b81526004016020604051808303816000875af115801561075a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077e9190610f9b565b1561086257600080826001600160a01b031663b869495960e01b8f8f8f8f8f8f8d8d6040516024016107b798979695949392919061102f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516107f59190611161565b600060405180830381855af49150503d8060008114610830576040519150601f19603f3d011682016040523d82523d6000602084013e610835565b606091505b509150915081819061085a5760405162461bcd60e51b815260040161030d919061117d565b50505061093f565b600080826001600160a01b031663b869495960e01b8f8f8f8f8f8f8d8d60405160240161089698979695949392919061102f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516108d49190611161565b6000604051808303816000865af19150503d8060008114610911576040519150601f19603f3d011682016040523d82523d6000602084013e610916565b606091505b509150915081819061093b5760405162461bcd60e51b815260040161030d919061117d565b5050505b508061094a816111b0565b9150506105d5565b5050505050505050505050565b8061096983610bca565b10156105c25760405162461bcd60e51b815260206004820152602a60248201527f44655061793a20496e73756666696369656e742062616c616e6365206166746560448201526972207061796d656e742160b01b606482015260840161030d565b604080516000808252602082019092526001600160a01b0384169083906040516109f49190611161565b60006040518083038185875af1925050503d8060008114610a31576040519150601f19603f3d011682016040523d82523d6000602084013e610a36565b606091505b5050905080610a9c5760405162461bcd60e51b815260206004820152602c60248201527f48656c7065723a3a736166655472616e736665724554483a204554482074726160448201526b1b9cd9995c8819985a5b195960a21b606482015260840161030d565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691610afd9190611161565b6000604051808303816000865af19150503d8060008114610b3a576040519150601f19603f3d011682016040523d82523d6000602084013e610b3f565b606091505b5091509150818015610b69575080511580610b69575080806020019051810190610b699190610f9b565b610bc35760405162461bcd60e51b815260206004820152602560248201527f48656c7065723a3a736166655472616e736665723a207472616e736665722066604482015264185a5b195960da1b606482015260840161030d565b5050505050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601610bf8575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610c3c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014191906111c9565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691610cc49190611161565b6000604051808303816000865af19150503d8060008114610d01576040519150601f19603f3d011682016040523d82523d6000602084013e610d06565b606091505b5091509150818015610d30575080511580610d30575080806020019051810190610d309190610f9b565b610d8e5760405162461bcd60e51b815260206004820152602960248201527f48656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726044820152681bdb4819985a5b195960ba1b606482015260840161030d565b505050505050565b6001600160a01b0381168114610dab57600080fd5b50565b600060208284031215610dc057600080fd5b8135610dcb81610d96565b9392505050565b60008083601f840112610de457600080fd5b50813567ffffffffffffffff811115610dfc57600080fd5b6020830191508360208260051b8501011115610e1757600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215610e3d57600080fd5b8a3567ffffffffffffffff80821115610e5557600080fd5b610e618e838f01610dd2565b909c509a5060208d0135915080821115610e7a57600080fd5b610e868e838f01610dd2565b909a50985060408d0135915080821115610e9f57600080fd5b610eab8e838f01610dd2565b909850965060608d0135915080821115610ec457600080fd5b610ed08e838f01610dd2565b909650945060808d0135915080821115610ee957600080fd5b50610ef68d828e01610dd2565b915080935050809150509295989b9194979a5092959850565b60008060408385031215610f2257600080fd5b8235610f2d81610d96565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b600082821015610f6357610f63610f3b565b500390565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610f9057600080fd5b8151610dcb81610d96565b600060208284031215610fad57600080fd5b81518015158114610dcb57600080fd5b8183526000602080850194508260005b85811015610ffb578135610fe081610d96565b6001600160a01b031687529582019590820190600101610fcd565b509495945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b608081526000611043608083018a8c610fbd565b8281036020848101919091528882526001600160fb1b0389111561106657600080fd5b8860051b808b8385013760009201818101838152858203830160408701529092611091828a8c610fbd565b868103606088015287815293508284019150600587901b8401830188825b8981101561111c57868303601f190185528135368c9003601e190181126110d4578485fd5b8b01868101903567ffffffffffffffff8111156110ef578586fd5b8036038213156110fd578586fd5b611108858284611006565b9688019694505050908501906001016110af565b50909f9e505050505050505050505050505050565b60005b8381101561114c578181015183820152602001611134565b8381111561115b576000848401525b50505050565b60008251611173818460208701611131565b9190910192915050565b602081526000825180602084015261119c816040850160208701611131565b601f01601f19169190910160400192915050565b6000600182016111c2576111c2610f3b565b5060010190565b6000602082840312156111db57600080fd5b505191905056fea2646970667358221220ffb774747755e6f7c7e56dbc560576b1e0207606d57b7f27ca0ed6288a5d736864736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b6780
-----Decoded View---------------
Arg [0] : _configuration (address): 0x5EC3153BACebb5e49136cF2d457f26f5Df1B6780
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000005ec3153bacebb5e49136cf2d457f26f5df1b6780
Deployed Bytecode Sourcemap
29277:5097:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33636:126;;;;;;;;;;-1:-1:-1;33636:126:0;;;;;:::i;:::-;;:::i;:::-;;;567:14:1;;560:22;542:41;;530:2;515:18;33636:126:0;;;;;;;;29559:57;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;793:32:1;;;775:51;;763:2;748:18;29559:57:0;594:238:1;29435:72:0;;;;;;;;;;;;29465:42;29435:72;;30370:878;;;;;;:::i;:::-;;:::i;34062:309::-;;;;;;;;;;-1:-1:-1;34062:309:0;;;;;:::i;:::-;;:::i;33636:126::-;33711:4;33730:26;33742:13;33730:11;:26::i;:::-;33723:33;33636:126;-1:-1:-1;;33636:126:0:o;30370:878::-;30997:4;;31031:35;31046:4;;31051:13;31063:1;31046:4;31051:13;:::i;:::-;31046:19;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;31031:14;:35::i;:::-;31010:56;;31073:38;31091:4;;31096:1;31091:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;31100;;31108:1;31100:10;;;;;;;:::i;:::-;;;;;;;31073:17;:38::i;:::-;31118:49;31127:4;;31133:7;;31142:9;;31153:7;;31162:4;;31118:8;:49::i;:::-;31174:50;31189:4;;31194:13;31206:1;31189:4;31194:13;:::i;:::-;31189:19;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;31210:13;31174:14;:50::i;:::-;-1:-1:-1;31238:4:0;;30370:878;-1:-1:-1;;;;;;;;;;;30370:878:0:o;34062:309::-;34150:4;30071:10;-1:-1:-1;;;;;30046:35:0;:13;-1:-1:-1;;;;;30046:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;30046:35:0;;30038:80;;;;-1:-1:-1;;;30038:80:0;;4326:2:1;30038:80:0;;;4308:21:1;;;4345:18;;;4338:30;4404:34;4384:18;;;4377:62;4456:18;;30038:80:0;;;;;;;;;-1:-1:-1;;;;;;;34166:12:0;::::1;::::0;34163:185:::1;;34189:62;34220:13;-1:-1:-1::0;;;;;34220:19:0::1;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;34244:6;34189:22;:62::i;:::-;34163:185;;;34274:66;34294:5;34309:13;-1:-1:-1::0;;;;;34309:19:0::1;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;34333:6;34274:19;:66::i;:::-;-1:-1:-1::0;34361:4:0::1;34062:309:::0;;;;:::o;33834:162::-;33931:44;;-1:-1:-1;;;33931:44:0;;-1:-1:-1;;;;;793:32:1;;;33931:44:0;;;775:51:1;33910:4:0;;;;33931:13;:29;;;;748:18:1;;33931:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;33931:58:0;;;;33834:162;-1:-1:-1;;33834:162:0:o;31430:156::-;31486:12;31517:15;31526:5;31517:8;:15::i;:::-;31507:25;-1:-1:-1;;;;;;;;31542:12:0;;;31539:42;;31558:20;31569:9;31558:20;;:::i;31539:42::-;31430:156;;;:::o;31701:279::-;-1:-1:-1;;;;;;;31778:14:0;;;31775:200;;31825:8;31812:9;:21;;31804:70;;;;-1:-1:-1;;;31804:70:0;;4687:2:1;31804:70:0;;;4669:21:1;4726:2;4706:18;;;4699:30;4765:34;4745:18;;;4738:62;-1:-1:-1;;;4816:18:1;;;4809:34;4860:19;;31804:70:0;4485:400:1;31804:70:0;31701:279;;:::o;31775:200::-;31898:69;31922:7;31931:10;31951:4;31958:8;31898:23;:69::i;32029:949::-;32230:6;32225:748;32242:18;;;32225:748;;;32284:23;32296:7;;32304:1;32296:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;32284:11;:23::i;:::-;32276:63;;;;-1:-1:-1;;;32276:63:0;;5092:2:1;32276:63:0;;;5074:21:1;5131:2;5111:18;;;5104:30;5170:29;5150:18;;;5143:57;5217:18;;32276:63:0;4890:351:1;32276:63:0;32356:27;32407:13;-1:-1:-1;;;;;32407:29:0;;32437:7;;32445:1;32437:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;32407:41;;-1:-1:-1;;;;;;32407:41:0;;;;;;;-1:-1:-1;;;;;793:32:1;;;32407:41:0;;;775:51:1;748:18;;32407:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;32356:93;;32463:6;-1:-1:-1;;;;;32463:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;32460:506;;;32494:12;32508:23;32543:6;-1:-1:-1;;;;;32535:28:0;32601:23;;;32626:4;;32632:7;;32641:9;;32652:4;;32564:103;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;32564:103:0;;;;;;;;;;;;;;-1:-1:-1;;;;;32564:103:0;-1:-1:-1;;;;;;32564:103:0;;;;;;;;;;32535:133;;;;32564:103;32535:133;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32493:175;;;;32687:7;32703:10;32679:36;;;;;-1:-1:-1;;;32679:36:0;;;;;;;;:::i;:::-;;32482:243;;32460:506;;;32743:12;32757:23;32792:6;-1:-1:-1;;;;;32784:20:0;32842:23;;;32867:4;;32873:7;;32882:9;;32893:4;;32805:103;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;32805:103:0;;;;;;;;;;;;;;-1:-1:-1;;;;;32805:103:0;-1:-1:-1;;;;;;32805:103:0;;;;;;;;;;32784:125;;;;32805:103;32784:125;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32742:167;;;;32928:7;32944:10;32920:36;;;;;-1:-1:-1;;;32920:36:0;;;;;;;;:::i;:::-;;32731:235;;32460:506;-1:-1:-1;32262:3:0;;;;:::i;:::-;;;;32225:748;;;;32029:949;;;;;;;;;;:::o;33104:178::-;33216:13;33194:18;33203:8;33194;:18::i;:::-;:35;;33186:90;;;;-1:-1:-1;;;33186:90:0;;9715:2:1;33186:90:0;;;9697:21:1;9754:2;9734:18;;;9727:30;9793:34;9773:18;;;9766:62;-1:-1:-1;;;9844:18:1;;;9837:40;9894:19;;33186:90:0;9513:406:1;23667:199:0;23776:12;;;23736;23776;;;;;;;;;-1:-1:-1;;;;;23754:7:0;;;23769:5;;23754:35;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23735:54;;;23804:7;23796:64;;;;-1:-1:-1;;;23796:64:0;;10258:2:1;23796:64:0;;;10240:21:1;10297:2;10277:18;;;10270:30;10336:34;10316:18;;;10309:62;-1:-1:-1;;;10387:18:1;;;10380:42;10439:19;;23796:64:0;10056:408:1;23796:64:0;23728:138;23667:199;;:::o;22816:397::-;23026:45;;;-1:-1:-1;;;;;10661:32:1;;;23026:45:0;;;10643:51:1;10710:18;;;;10703:34;;;23026:45:0;;;;;;;;;;10616:18:1;;;;23026:45:0;;;;;;;-1:-1:-1;;;;;23026:45:0;-1:-1:-1;;;23026:45:0;;;23015:57;;-1:-1:-1;;;;23015:10:0;;;;:57;;23026:45;23015:57;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22979:93;;;;23095:7;:57;;;;-1:-1:-1;23107:11:0;;:16;;:44;;;23138:4;23127:24;;;;;;;;;;;;:::i;:::-;23079:128;;;;-1:-1:-1;;;23079:128:0;;10950:2:1;23079:128:0;;;10932:21:1;10989:2;10969:18;;;10962:30;11028:34;11008:18;;;11001:62;-1:-1:-1;;;11079:18:1;;;11072:35;11124:19;;23079:128:0;10748:401:1;23079:128:0;22909:304;;22816:397;;;:::o;33367:206::-;33421:4;-1:-1:-1;;;;;;;33437:12:0;;;33434:134;;-1:-1:-1;33469:21:0;;33367:206;-1:-1:-1;33367:206:0:o;33434:134::-;33522:38;;-1:-1:-1;;;33522:38:0;;33554:4;33522:38;;;775:51:1;-1:-1:-1;;;;;33522:23:0;;;;;748:18:1;;33522:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;23219:442::-;23464:51;;;-1:-1:-1;;;;;11601:15:1;;;23464:51:0;;;11583:34:1;11653:15;;;11633:18;;;11626:43;11685:18;;;;11678:34;;;23464:51:0;;;;;;;;;;11518:18:1;;;;23464:51:0;;;;;;;-1:-1:-1;;;;;23464:51:0;-1:-1:-1;;;23464:51:0;;;23453:63;;-1:-1:-1;;;;23453:10:0;;;;:63;;23464:51;23453:63;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23417:99;;;;23539:7;:57;;;;-1:-1:-1;23551:11:0;;:16;;:44;;;23582:4;23571:24;;;;;;;;;;;;:::i;:::-;23523:132;;;;-1:-1:-1;;;23523:132:0;;11925:2:1;23523:132:0;;;11907:21:1;11964:2;11944:18;;;11937:30;12003:34;11983:18;;;11976:62;-1:-1:-1;;;12054:18:1;;;12047:39;12103:19;;23523:132:0;11723:405:1;23523:132:0;23335:326;;23219:442;;;;:::o;14:131:1:-;-1:-1:-1;;;;;89:31:1;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:247::-;209:6;262:2;250:9;241:7;237:23;233:32;230:52;;;278:1;275;268:12;230:52;317:9;304:23;336:31;361:5;336:31;:::i;:::-;386:5;150:247;-1:-1:-1;;;150:247:1:o;1045:367::-;1108:8;1118:6;1172:3;1165:4;1157:6;1153:17;1149:27;1139:55;;1190:1;1187;1180:12;1139:55;-1:-1:-1;1213:20:1;;1256:18;1245:30;;1242:50;;;1288:1;1285;1278:12;1242:50;1325:4;1317:6;1313:17;1301:29;;1385:3;1378:4;1368:6;1365:1;1361:14;1353:6;1349:27;1345:38;1342:47;1339:67;;;1402:1;1399;1392:12;1339:67;1045:367;;;;;:::o;1417:1732::-;1659:6;1667;1675;1683;1691;1699;1707;1715;1723;1731;1784:3;1772:9;1763:7;1759:23;1755:33;1752:53;;;1801:1;1798;1791:12;1752:53;1841:9;1828:23;1870:18;1911:2;1903:6;1900:14;1897:34;;;1927:1;1924;1917:12;1897:34;1966:70;2028:7;2019:6;2008:9;2004:22;1966:70;:::i;:::-;2055:8;;-1:-1:-1;1940:96:1;-1:-1:-1;2143:2:1;2128:18;;2115:32;;-1:-1:-1;2159:16:1;;;2156:36;;;2188:1;2185;2178:12;2156:36;2227:72;2291:7;2280:8;2269:9;2265:24;2227:72;:::i;:::-;2318:8;;-1:-1:-1;2201:98:1;-1:-1:-1;2406:2:1;2391:18;;2378:32;;-1:-1:-1;2422:16:1;;;2419:36;;;2451:1;2448;2441:12;2419:36;2490:72;2554:7;2543:8;2532:9;2528:24;2490:72;:::i;:::-;2581:8;;-1:-1:-1;2464:98:1;-1:-1:-1;2669:2:1;2654:18;;2641:32;;-1:-1:-1;2685:16:1;;;2682:36;;;2714:1;2711;2704:12;2682:36;2753:72;2817:7;2806:8;2795:9;2791:24;2753:72;:::i;:::-;2844:8;;-1:-1:-1;2727:98:1;-1:-1:-1;2932:3:1;2917:19;;2904:33;;-1:-1:-1;2949:16:1;;;2946:36;;;2978:1;2975;2968:12;2946:36;;3017:72;3081:7;3070:8;3059:9;3055:24;3017:72;:::i;:::-;2991:98;;3108:8;3098:18;;;3135:8;3125:18;;;1417:1732;;;;;;;;;;;;;:::o;3154:315::-;3222:6;3230;3283:2;3271:9;3262:7;3258:23;3254:32;3251:52;;;3299:1;3296;3289:12;3251:52;3338:9;3325:23;3357:31;3382:5;3357:31;:::i;:::-;3407:5;3459:2;3444:18;;;;3431:32;;-1:-1:-1;;;3154:315:1:o;3474:127::-;3535:10;3530:3;3526:20;3523:1;3516:31;3566:4;3563:1;3556:15;3590:4;3587:1;3580:15;3606:125;3646:4;3674:1;3671;3668:8;3665:34;;;3679:18;;:::i;:::-;-1:-1:-1;3716:9:1;;3606:125::o;3736:127::-;3797:10;3792:3;3788:20;3785:1;3778:31;3828:4;3825:1;3818:15;3852:4;3849:1;3842:15;3868:251;3938:6;3991:2;3979:9;3970:7;3966:23;3962:32;3959:52;;;4007:1;4004;3997:12;3959:52;4039:9;4033:16;4058:31;4083:5;4058:31;:::i;5246:277::-;5313:6;5366:2;5354:9;5345:7;5341:23;5337:32;5334:52;;;5382:1;5379;5372:12;5334:52;5414:9;5408:16;5467:5;5460:13;5453:21;5446:5;5443:32;5433:60;;5489:1;5486;5479:12;5528:522;5628:6;5623:3;5616:19;5598:3;5654:4;5683:2;5678:3;5674:12;5667:19;;5709:5;5732:1;5742:283;5756:6;5753:1;5750:13;5742:283;;;5833:6;5820:20;5853:33;5878:7;5853:33;:::i;:::-;-1:-1:-1;;;;;5911:33:1;5899:46;;5965:12;;;;6000:15;;;;5941:1;5771:9;5742:283;;;-1:-1:-1;6041:3:1;;5528:522;-1:-1:-1;;;;;5528:522:1:o;6055:267::-;6144:6;6139:3;6132:19;6196:6;6189:5;6182:4;6177:3;6173:14;6160:43;-1:-1:-1;6248:1:1;6223:16;;;6241:4;6219:27;;;6212:38;;;;6304:2;6283:15;;;-1:-1:-1;;6279:29:1;6270:39;;;6266:50;;6055:267::o;6327:2111::-;6802:3;6791:9;6784:22;6765:4;6829:74;6898:3;6887:9;6883:19;6875:6;6867;6829:74;:::i;:::-;6960:22;;;6922:2;6940:18;;;6933:50;;;;6992:22;;;-1:-1:-1;;;;;7026:31:1;;7023:51;;;7070:1;7067;7060:12;7023:51;7104:6;7101:1;7097:14;7158:6;7150;7145:2;7137:6;7133:15;7120:45;7252:1;7184:19;;7222:11;;;7262:14;;;7316:18;;;7312:27;;7307:2;7292:18;;7285:55;7184:19;;7363:57;7222:11;7409:6;7401;7363:57;:::i;:::-;7456:22;;;7451:2;7436:18;;7429:50;7514:22;;;7349:71;-1:-1:-1;7552:15:1;;;;-1:-1:-1;7610:1:1;7606:14;;;7594:27;;7590:36;;7649:6;7673:2;7684:725;7698:6;7695:1;7692:13;7684:725;;;7763:19;;;-1:-1:-1;;7759:33:1;7747:46;;7832:20;;7907:14;7903:27;;;-1:-1:-1;;7899:41:1;7875:66;;7865:96;;7956:2;7952;7945:14;7865:96;7987:31;;8094:14;;;;8047:19;8137:18;8124:32;;8121:54;;;8170:2;8166;8159:14;8121:54;8224:8;8208:14;8204:29;8195:7;8191:43;8188:65;;;8248:2;8244;8237:14;8188:65;8276:53;8322:6;8312:8;8303:7;8276:53;:::i;:::-;8387:12;;;;8266:63;-1:-1:-1;;;8352:15:1;;;;7720:1;7713:9;7684:725;;;-1:-1:-1;8426:6:1;;6327:2111;-1:-1:-1;;;;;;;;;;;;;;;6327:2111:1:o;8443:258::-;8515:1;8525:113;8539:6;8536:1;8533:13;8525:113;;;8615:11;;;8609:18;8596:11;;;8589:39;8561:2;8554:10;8525:113;;;8656:6;8653:1;8650:13;8647:48;;;8691:1;8682:6;8677:3;8673:16;8666:27;8647:48;;8443:258;;;:::o;8706:274::-;8835:3;8873:6;8867:13;8889:53;8935:6;8930:3;8923:4;8915:6;8911:17;8889:53;:::i;:::-;8958:16;;;;;8706:274;-1:-1:-1;;8706:274:1:o;8985:383::-;9134:2;9123:9;9116:21;9097:4;9166:6;9160:13;9209:6;9204:2;9193:9;9189:18;9182:34;9225:66;9284:6;9279:2;9268:9;9264:18;9259:2;9251:6;9247:15;9225:66;:::i;:::-;9352:2;9331:15;-1:-1:-1;;9327:29:1;9312:45;;;;9359:2;9308:54;;8985:383;-1:-1:-1;;8985:383:1:o;9373:135::-;9412:3;9433:17;;;9430:43;;9453:18;;:::i;:::-;-1:-1:-1;9500:1:1;9489:13;;9373:135::o;11154:184::-;11224:6;11277:2;11265:9;11256:7;11252:23;11248:32;11245:52;;;11293:1;11290;11283:12;11245:52;-1:-1:-1;11316:16:1;;11154:184;-1:-1:-1;11154:184:1:o
Swarm Source
ipfs://ffb774747755e6f7c7e56dbc560576b1e0207606d57b7f27ca0ed6288a5d7368
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.003576 | 120 | $0.4291 |
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.