More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 732 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Admin | 16275624 | 623 days ago | IN | 0 ETH | 0.00071298 | ||||
Router Call Nati... | 16261047 | 625 days ago | IN | 0 ETH | 0.00043872 | ||||
Pause Execution | 16261025 | 625 days ago | IN | 0 ETH | 0.00055507 | ||||
Router Call Nati... | 16261017 | 625 days ago | IN | 0 ETH | 0.00115549 | ||||
Router Call Nati... | 16260999 | 625 days ago | IN | 0 ETH | 0.00126188 | ||||
Router Call Nati... | 16260953 | 625 days ago | IN | 0 ETH | 0.00097277 | ||||
0x023b872d | 16260949 | 625 days ago | IN | 0 ETH | 0.00034666 | ||||
Router Call | 16205303 | 633 days ago | IN | 0.001586 ETH | 0.00701236 | ||||
Router Call | 16199324 | 634 days ago | IN | 0.001586 ETH | 0.01141722 | ||||
Router Call Nati... | 16195149 | 634 days ago | IN | 0.090586 ETH | 0.00244837 | ||||
Router Call Nati... | 16054220 | 654 days ago | IN | 0.70249022 ETH | 0.00443381 | ||||
Router Call Nati... | 16054007 | 654 days ago | IN | 0.002586 ETH | 0.00150662 | ||||
Router Call Nati... | 16053946 | 654 days ago | IN | 4.00130239 ETH | 0.00924069 | ||||
Router Call | 15932093 | 671 days ago | IN | 0.0007081 ETH | 0.01750338 | ||||
Router Call Nati... | 15901209 | 675 days ago | IN | 0.500586 ETH | 0.004969 | ||||
Router Call | 15900337 | 675 days ago | IN | 0.000586 ETH | 0.00516535 | ||||
Router Call | 15887311 | 677 days ago | IN | 0.00069754 ETH | 0.0016155 | ||||
Sweep Tokens | 15883843 | 678 days ago | IN | 0 ETH | 0.00068646 | ||||
Router Call | 15873552 | 679 days ago | IN | 0.0007081 ETH | 0.0047226 | ||||
Router Call | 15873539 | 679 days ago | IN | 0.0007081 ETH | 0.00445666 | ||||
Router Call | 15842889 | 683 days ago | IN | 0.000586 ETH | 0.0073283 | ||||
Router Call | 15804182 | 689 days ago | IN | 0.000586 ETH | 0.0078905 | ||||
Router Call | 15791001 | 691 days ago | IN | 0.000586 ETH | 0.01342349 | ||||
Router Call | 15779608 | 692 days ago | IN | 0.001586 ETH | 0.00703542 | ||||
Router Call | 15748849 | 696 days ago | IN | 0.000586 ETH | 0.00673023 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16205303 | 633 days ago | 0.001 ETH | ||||
16199324 | 634 days ago | 0.001 ETH | ||||
16195149 | 634 days ago | 0.09 ETH | ||||
16054220 | 654 days ago | 0.70190422 ETH | ||||
16054007 | 654 days ago | 0.002 ETH | ||||
16053946 | 654 days ago | 4.00071639 ETH | ||||
15932093 | 671 days ago | 0.0001221 ETH | ||||
15901209 | 675 days ago | 0.5 ETH | ||||
15883843 | 678 days ago | 0.15459011 ETH | ||||
15873552 | 679 days ago | 0.0001221 ETH | ||||
15873539 | 679 days ago | 0.0001221 ETH | ||||
15779608 | 692 days ago | 0.001 ETH | ||||
15697538 | 704 days ago | 0.00011682 ETH | ||||
15690315 | 705 days ago | 0.0997 ETH | ||||
15674176 | 707 days ago | 0.05 ETH | ||||
15673972 | 707 days ago | 0.0223 ETH | ||||
15671826 | 707 days ago | 1.51460075 ETH | ||||
15670174 | 707 days ago | 0.1617316 ETH | ||||
15670067 | 707 days ago | 0.12 ETH | ||||
15669466 | 708 days ago | 0.00997 ETH | ||||
15664114 | 708 days ago | 0.01 ETH | ||||
15662326 | 709 days ago | 0.01 ETH | ||||
15660930 | 709 days ago | 0.01 ETH | ||||
15659520 | 709 days ago | 0.01 ETH | ||||
15656780 | 709 days ago | 0.009 ETH |
Loading...
Loading
Contract Name:
RubicProxy
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 100000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; /** ██████╗ ██╗ ██╗██████╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗██╗ ██╗ ██╔══██╗██║ ██║██╔══██╗██║██╔════╝ ██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝╚██╗ ██╔╝ ██████╔╝██║ ██║██████╔╝██║██║ ██████╔╝██████╔╝██║ ██║ ╚███╔╝ ╚████╔╝ ██╔══██╗██║ ██║██╔══██╗██║██║ ██╔═══╝ ██╔══██╗██║ ██║ ██╔██╗ ╚██╔╝ ██║ ██║╚██████╔╝██████╔╝██║╚██████╗ ██║ ██║ ██║╚██████╔╝██╔╝ ██╗ ██║ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ */ import 'rubic-bridge-base/contracts/architecture/OnlySourceFunctionality.sol'; import 'rubic-bridge-base/contracts/libraries/SmartApprove.sol'; error DifferentAmountSpent(); error RouterNotAvailable(); /** @title RubicProxy @author Vladislav Yaroshuk @author George Eliseev @notice Universal proxy contract to Symbiosis, LiFi, deBridge and other cross-chain solutions */ contract RubicProxy is OnlySourceFunctionality { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using SafeERC20Upgradeable for IERC20Upgradeable; constructor( uint256 _fixedCryptoFee, uint256 _RubicPlatformFee, address[] memory _routers, address[] memory _tokens, uint256[] memory _minTokenAmounts, uint256[] memory _maxTokenAmounts ) { initialize(_fixedCryptoFee, _RubicPlatformFee, _routers, _tokens, _minTokenAmounts, _maxTokenAmounts); } function initialize( uint256 _fixedCryptoFee, uint256 _RubicPlatformFee, address[] memory _routers, address[] memory _tokens, uint256[] memory _minTokenAmounts, uint256[] memory _maxTokenAmounts ) private initializer { __OnlySourceFunctionalityInit( _fixedCryptoFee, _RubicPlatformFee, _routers, _tokens, _minTokenAmounts, _maxTokenAmounts ); } function routerCall( BaseCrossChainParams calldata _params, address _gateway, bytes calldata _data ) external payable nonReentrant whenNotPaused eventEmitter(_params) { if (!(availableRouters.contains(_params.router) && availableRouters.contains(_gateway))) { revert RouterNotAvailable(); } IERC20Upgradeable(_params.srcInputToken).safeTransferFrom(msg.sender, address(this), _params.srcInputAmount); IntegratorFeeInfo memory _info = integratorToFeeInfo[_params.integrator]; uint256 _amountIn = accrueTokenFees( _params.integrator, _info, _params.srcInputAmount, 0, _params.srcInputToken ); SmartApprove.smartApprove(_params.srcInputToken, _amountIn, _gateway); uint256 balanceBefore = IERC20Upgradeable(_params.srcInputToken).balanceOf(address(this)); AddressUpgradeable.functionCallWithValue( _params.router, _data, accrueFixedCryptoFee(_params.integrator, _info) ); if (balanceBefore - IERC20Upgradeable(_params.srcInputToken).balanceOf(address(this)) != _amountIn) { revert DifferentAmountSpent(); } } function routerCallNative(BaseCrossChainParams calldata _params, bytes calldata _data) external payable nonReentrant whenNotPaused eventEmitter(_params) { if (!availableRouters.contains(_params.router)) { revert RouterNotAvailable(); } IntegratorFeeInfo memory _info = integratorToFeeInfo[_params.integrator]; uint256 _amountIn = accrueTokenFees( _params.integrator, _info, accrueFixedCryptoFee(_params.integrator, _info), 0, address(0) ); AddressUpgradeable.functionCallWithValue(_params.router, _data, _amountIn); } function sweepTokens(address _token, uint256 _amount) external onlyAdmin { sendToken(_token, _amount, msg.sender); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '../BridgeBase.sol'; contract OnlySourceFunctionality is BridgeBase { event RequestSent(BaseCrossChainParams parameters); modifier eventEmitter(BaseCrossChainParams calldata _params) { _; emit RequestSent(_params); } function __OnlySourceFunctionalityInit( uint256 _fixedCryptoFee, uint256 _RubicPlatformFee, address[] memory _routers, address[] memory _tokens, uint256[] memory _minTokenAmounts, uint256[] memory _maxTokenAmounts ) internal onlyInitializing { __BridgeBaseInit(_fixedCryptoFee, _RubicPlatformFee, _routers, _tokens, _minTokenAmounts, _maxTokenAmounts); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol'; import '../errors/Errors.sol'; library SmartApprove { using SafeERC20Upgradeable for IERC20Upgradeable; function smartApprove( address _tokenIn, uint256 _amount, address _to ) internal { IERC20Upgradeable tokenIn = IERC20Upgradeable(_tokenIn); uint256 _allowance = tokenIn.allowance(address(this), _to); if (_allowance < _amount) { if (_allowance == 0) { tokenIn.safeApprove(_to, type(uint256).max); } else { try tokenIn.approve(_to, type(uint256).max) returns (bool res) { if (!res) { revert ApproveFailed(); } } catch { tokenIn.safeApprove(_to, 0); tokenIn.safeApprove(_to, type(uint256).max); } } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import './libraries/FullMath.sol'; import './errors/Errors.sol'; contract BridgeBase is AccessControlUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using SafeERC20Upgradeable for IERC20Upgradeable; // Denominator for setting fees uint256 internal constant DENOMINATOR = 1e6; bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE'); // Struct with all info about integrator fees mapping(address => IntegratorFeeInfo) public integratorToFeeInfo; // Amount of collected fees in native token integrator -> native fees mapping(address => uint256) public availableIntegratorCryptoFee; // token -> minAmount for swap mapping(address => uint256) public minTokenAmount; // token -> maxAmount for swap mapping(address => uint256) public maxTokenAmount; // token -> rubic collected fees mapping(address => uint256) public availableRubicTokenFee; // token -> integrator collected fees mapping(address => mapping(address => uint256)) public availableIntegratorTokenFee; // Rubic token fee uint256 public RubicPlatformFee; // Rubic fixed fee for swap uint256 public fixedCryptoFee; // Collected rubic fees in native token uint256 public availableRubicCryptoFee; // AddressSet of whitelisted addresses EnumerableSetUpgradeable.AddressSet internal availableRouters; event FixedCryptoFee(uint256 RubicPart, uint256 integratorPart, address indexed integrator); event FixedCryptoFeeCollected(uint256 amount, address collector); event TokenFee(uint256 RubicPart, uint256 integratorPart, address indexed integrator, address token); event IntegratorTokenFeeCollected(uint256 amount, address indexed integrator, address token); event RubicTokenFeeCollected(uint256 amount, address token); struct IntegratorFeeInfo { bool isIntegrator; // flag for setting 0 fees for integrator - 1 byte uint32 tokenFee; // total fee percent gathered from user - 4 bytes uint32 RubicTokenShare; // token share of platform commission - 4 bytes uint32 RubicFixedCryptoShare; // native share of fixed commission - 4 bytes uint128 fixedFeeAmount; // custom fixed fee amount - 16 bytes } // total - 29 bytes <= 32 bytes struct BaseCrossChainParams { address srcInputToken; uint256 srcInputAmount; uint256 dstChainID; address dstOutputToken; uint256 dstMinOutputAmount; address recipient; address integrator; address router; } // reference to https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3347/ modifier onlyAdmin() { checkIsAdmin(); _; } modifier onlyManagerOrAdmin() { checkIsManagerOrAdmin(); _; } modifier onlyEOA() { if (msg.sender != tx.origin) { revert OnlyEOA(); } _; } function __BridgeBaseInit( uint256 _fixedCryptoFee, uint256 _RubicPlatformFee, address[] memory _routers, address[] memory _tokens, uint256[] memory _minTokenAmounts, uint256[] memory _maxTokenAmounts ) internal onlyInitializing { __Pausable_init_unchained(); fixedCryptoFee = _fixedCryptoFee; if (_RubicPlatformFee > DENOMINATOR) { revert FeeTooHigh(); } RubicPlatformFee = _RubicPlatformFee; uint256 routerLength = _routers.length; for (uint256 i; i < routerLength; ) { availableRouters.add(_routers[i]); unchecked { ++i; } } uint256 tokensLength = _tokens.length; for (uint256 i; i < tokensLength; ) { if (_minTokenAmounts[i] > _maxTokenAmounts[i]) { revert MinMustBeLowerThanMax(); } minTokenAmount[_tokens[i]] = _minTokenAmounts[i]; maxTokenAmount[_tokens[i]] = _maxTokenAmounts[i]; unchecked { ++i; } } _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } /** * @dev Calculates and accrues fixed crypto fee * @param _integrator Integrator's address if there is one * @param _info A struct with integrator fee info * @return The msg.value without fixedCryptoFee */ function accrueFixedCryptoFee(address _integrator, IntegratorFeeInfo memory _info) internal returns (uint256) { uint256 _fixedCryptoFee; uint256 _RubicPart; if (_info.isIntegrator) { _fixedCryptoFee = uint256(_info.fixedFeeAmount); if (_fixedCryptoFee > 0) { _RubicPart = (_fixedCryptoFee * _info.RubicFixedCryptoShare) / DENOMINATOR; availableIntegratorCryptoFee[_integrator] += _fixedCryptoFee - _RubicPart; } } else { _fixedCryptoFee = fixedCryptoFee; _RubicPart = _fixedCryptoFee; } availableRubicCryptoFee += _RubicPart; emit FixedCryptoFee(_RubicPart, _fixedCryptoFee - _RubicPart, _integrator); // Underflow is prevented by sol 0.8 return (msg.value - _fixedCryptoFee); } /** * @dev Calculates token fees and accrues them * @param _integrator Integrator's address if there is one * @param _info A struct with fee info about integrator * @param _amountWithFee Total amount passed by the user * @param _token The token in which the fees are collected * @param _initBlockchainNum Used if the _calculateFee is overriden by * WithDestinationFunctionality, otherwise is ignored * @return Amount of tokens without fee */ function accrueTokenFees( address _integrator, IntegratorFeeInfo memory _info, uint256 _amountWithFee, uint256 _initBlockchainNum, address _token ) internal returns (uint256) { (uint256 _totalFees, uint256 _RubicFee) = _calculateFee(_info, _amountWithFee, _initBlockchainNum); if (_integrator != address(0)) { availableIntegratorTokenFee[_token][_integrator] += _totalFees - _RubicFee; } availableRubicTokenFee[_token] += _RubicFee; emit TokenFee(_RubicFee, _totalFees - _RubicFee, _integrator, _token); return _amountWithFee - _totalFees; } /** * @dev Calculates fee amount for integrator and rubic, used in architecture * @param _amountWithFee the users initial amount * @param _info the struct with data about integrator * @return _totalFee the amount of Rubic + integrator fee * @return _RubicFee the amount of Rubic fee only */ function _calculateFeeWithIntegrator(uint256 _amountWithFee, IntegratorFeeInfo memory _info) internal pure returns (uint256 _totalFee, uint256 _RubicFee) { if (_info.tokenFee > 0) { _totalFee = FullMath.mulDiv(_amountWithFee, _info.tokenFee, DENOMINATOR); _RubicFee = FullMath.mulDiv(_totalFee, _info.RubicTokenShare, DENOMINATOR); } } function _calculateFee( IntegratorFeeInfo memory _info, uint256 _amountWithFee, uint256 ) internal view returns (uint256 _totalFee, uint256 _RubicFee) { if (_info.isIntegrator) { (_totalFee, _RubicFee) = _calculateFeeWithIntegrator(_amountWithFee, _info); } else { _totalFee = FullMath.mulDiv(_amountWithFee, RubicPlatformFee, DENOMINATOR); _RubicFee = _totalFee; } } /// COLLECT FUNCTIONS /// function _collectIntegrator(address _integrator, address _token) private { uint256 _amount; if (_token == address(0)) { _amount = availableIntegratorCryptoFee[_integrator]; availableIntegratorCryptoFee[_integrator] = 0; emit FixedCryptoFeeCollected(_amount, _integrator); } _amount += availableIntegratorTokenFee[_token][_integrator]; if (_amount == 0) { revert ZeroAmount(); } availableIntegratorTokenFee[_token][_integrator] = 0; sendToken(_token, _amount, _integrator); emit IntegratorTokenFeeCollected(_amount, _integrator, _token); } /** * @dev Integrator can collect fees calling this function * @param _token The token to collect fees in */ function collectIntegratorFee(address _token) external nonReentrant { _collectIntegrator(msg.sender, _token); } /** * @dev Managers can collect integrator's fees calling this function * Fees go to the integrator * @param _integrator Address of the integrator * @param _token The token to collect fees in */ function collectIntegratorFee(address _integrator, address _token) external onlyManagerOrAdmin { _collectIntegrator(_integrator, _token); } /** * @dev Calling this function managers can collect Rubic's token fee * @param _token The token to collect fees in */ function collectRubicFee(address _token) external onlyManagerOrAdmin { uint256 _amount = availableRubicTokenFee[_token]; if (_amount == 0) { revert ZeroAmount(); } availableRubicTokenFee[_token] = 0; sendToken(_token, _amount, msg.sender); emit RubicTokenFeeCollected(_amount, _token); } /** * @dev Calling this function managers can collect Rubic's fixed crypto fee */ function collectRubicCryptoFee() external onlyManagerOrAdmin { uint256 _cryptoFee = availableRubicCryptoFee; availableRubicCryptoFee = 0; sendToken(address(0), _cryptoFee, msg.sender); emit FixedCryptoFeeCollected(_cryptoFee, msg.sender); } /// CONTROL FUNCTIONS /// function pauseExecution() external onlyManagerOrAdmin { _pause(); } function unpauseExecution() external onlyManagerOrAdmin { _unpause(); } /** * @dev Sets fee info associated with an integrator * @param _integrator Address of the integrator * @param _info Struct with fee info */ function setIntegratorInfo(address _integrator, IntegratorFeeInfo memory _info) external onlyManagerOrAdmin { if (_info.tokenFee > DENOMINATOR) { revert FeeTooHigh(); } if (_info.RubicTokenShare > DENOMINATOR || _info.RubicFixedCryptoShare > DENOMINATOR) { revert ShareTooHigh(); } integratorToFeeInfo[_integrator] = _info; } /** * @dev Sets fixed crypto fee * @param _fixedCryptoFee Fixed crypto fee */ function setFixedCryptoFee(uint256 _fixedCryptoFee) external onlyManagerOrAdmin { fixedCryptoFee = _fixedCryptoFee; } function setRubicPlatformFee(uint256 _platformFee) external onlyManagerOrAdmin { if (_platformFee > DENOMINATOR) { revert FeeTooHigh(); } RubicPlatformFee = _platformFee; } /** * @dev Changes requirement for minimal token amount on transfers * @param _token The token address to setup * @param _minTokenAmount Amount of tokens */ function setMinTokenAmount(address _token, uint256 _minTokenAmount) external onlyManagerOrAdmin { if (_minTokenAmount > maxTokenAmount[_token]) { // can be equal in case we want them to be zero revert MinMustBeLowerThanMax(); } minTokenAmount[_token] = _minTokenAmount; } /** * @dev Changes requirement for maximum token amount on transfers * @param _token The token address to setup * @param _maxTokenAmount Amount of tokens */ function setMaxTokenAmount(address _token, uint256 _maxTokenAmount) external onlyManagerOrAdmin { if (_maxTokenAmount < minTokenAmount[_token]) { // can be equal in case we want them to be zero revert MaxMustBeBiggerThanMin(); } maxTokenAmount[_token] = _maxTokenAmount; } /** * @dev Appends new available router * @param _router Router's address to add */ function addAvailableRouter(address _router) external onlyManagerOrAdmin { if (_router == address(0)) { revert ZeroAddress(); } // Check that router exists is performed inside the library availableRouters.add(_router); } /** * @dev Removes existing available router * @param _router Router's address to remove */ function removeAvailableRouter(address _router) external onlyManagerOrAdmin { // Check that router exists is performed inside the library availableRouters.remove(_router); } /** * @dev Transfers admin role * @param _newAdmin New admin's address */ function transferAdmin(address _newAdmin) external onlyAdmin { _revokeRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(DEFAULT_ADMIN_ROLE, _newAdmin); } /// VIEW FUNCTIONS /// /** * @return Available routers */ function getAvailableRouters() external view returns (address[] memory) { return availableRouters.values(); } /** * @notice Used in modifiers * @dev Function to check if address is belongs to manager or admin role */ function checkIsManagerOrAdmin() internal view { if (!(hasRole(MANAGER_ROLE, msg.sender) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender))) { revert NotAManager(); } } /** * @notice Used in modifiers * @dev Function to check if address is belongs to default admin role */ function checkIsAdmin() internal view { if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) { revert NotAnAdmin(); } } function sendToken( address _token, uint256 _amount, address _receiver ) internal virtual { if (_token == address(0)) { AddressUpgradeable.sendValue(payable(_receiver), _amount); } else { IERC20Upgradeable(_token).safeTransfer(_receiver, _amount); } } /** * @dev Plain fallback function to receive native */ receive() external payable {} /** * @dev Plain fallback function */ fallback() external {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../extensions/draft-IERC20PermitUpgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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)); } } function safePermit( IERC20PermitUpgradeable token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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(IERC20Upgradeable 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"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @title Contains 512-bit math functions /// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision /// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits library FullMath { /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 /// @param a The multiplicand /// @param b The multiplier /// @param denominator The divisor /// @return result The 256-bit result /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv function mulDiv( uint256 a, uint256 b, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = a * b // Compute the product mod 2**256 and mod 2**256 - 1 // then use the Chinese Remainder Theorem to reconstruct // the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2**256 + prod0 uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(a, b, not(0)) prod0 := mul(a, b) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division if (prod1 == 0) { require(denominator > 0); assembly { result := div(prod0, denominator) } return result; } // Make sure the result is less than 2**256. // Also prevents denominator == 0 require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0] // Compute remainder using mulmod uint256 remainder; assembly { remainder := mulmod(a, b, denominator) } // Subtract 256 bit number from 512 bit number assembly { prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator // Compute largest power of two divisor of denominator. // Always >= 1. uint256 twos = (0 - denominator) & denominator; // Divide denominator by power of two assembly { denominator := div(denominator, twos) } // Divide [prod1 prod0] by the factors of two assembly { prod0 := div(prod0, twos) } // Shift in bits from prod1 into prod0. For this we need // to flip `twos` such that it is 2**256 / twos. // If twos is zero, then it becomes one assembly { twos := add(div(sub(0, twos), twos), 1) } prod0 |= prod1 * twos; // Invert denominator mod 2**256 // Now that denominator is an odd number, it has an inverse // modulo 2**256 such that denominator * inv = 1 mod 2**256. // Compute the inverse by starting with a seed that is correct // correct for four bits. That is, denominator * inv = 1 mod 2**4 uint256 inv = (3 * denominator) ^ 2; // Now use Newton-Raphson iteration to improve the precision. // Thanks to Hensel's lifting lemma, this also works in modular // arithmetic, doubling the correct bits in each step. inv *= 2 - denominator * inv; // inverse mod 2**8 inv *= 2 - denominator * inv; // inverse mod 2**16 inv *= 2 - denominator * inv; // inverse mod 2**32 inv *= 2 - denominator * inv; // inverse mod 2**64 inv *= 2 - denominator * inv; // inverse mod 2**128 inv *= 2 - denominator * inv; // inverse mod 2**256 // Because the division is now exact we can divide by multiplying // with the modular inverse of denominator. This will give us the // correct result modulo 2**256. Since the precoditions guarantee // that the outcome is less than 2**256, this is the final result. // We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inv; return result; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; error NotAnAdmin(); error NotAManager(); error NotARelayer(); error OnlyEOA(); error FeeTooHigh(); error ShareTooHigh(); error ZeroAddress(); error ZeroAmount(); error InefficientFixedFee(); error ApproveFailed(); error MinMustBeLowerThanMax(); error MaxMustBeBiggerThanMin(); error CantSetToNull(); error Unchangeable(); error LengthMismatch();
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20PermitUpgradeable { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 100000 }, "metadata": { "bytecodeHash": "none" }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_fixedCryptoFee","type":"uint256"},{"internalType":"uint256","name":"_RubicPlatformFee","type":"uint256"},{"internalType":"address[]","name":"_routers","type":"address[]"},{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_minTokenAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_maxTokenAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApproveFailed","type":"error"},{"inputs":[],"name":"DifferentAmountSpent","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"MaxMustBeBiggerThanMin","type":"error"},{"inputs":[],"name":"MinMustBeLowerThanMax","type":"error"},{"inputs":[],"name":"NotAManager","type":"error"},{"inputs":[],"name":"NotAnAdmin","type":"error"},{"inputs":[],"name":"RouterNotAvailable","type":"error"},{"inputs":[],"name":"ShareTooHigh","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"RubicPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"integratorPart","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"}],"name":"FixedCryptoFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"collector","type":"address"}],"name":"FixedCryptoFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"IntegratorTokenFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"indexed":false,"internalType":"struct BridgeBase.BaseCrossChainParams","name":"parameters","type":"tuple"}],"name":"RequestSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RubicTokenFeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"RubicPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"integratorPart","type":"uint256"},{"indexed":true,"internalType":"address","name":"integrator","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RubicPlatformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"addAvailableRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableIntegratorCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"availableIntegratorTokenFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableRubicCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableRubicTokenFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"collectIntegratorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_integrator","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"collectIntegratorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectRubicCryptoFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"collectRubicFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fixedCryptoFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableRouters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"integratorToFeeInfo","outputs":[{"internalType":"bool","name":"isIntegrator","type":"bool"},{"internalType":"uint32","name":"tokenFee","type":"uint32"},{"internalType":"uint32","name":"RubicTokenShare","type":"uint32"},{"internalType":"uint32","name":"RubicFixedCryptoShare","type":"uint32"},{"internalType":"uint128","name":"fixedFeeAmount","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"removeAvailableRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"internalType":"struct BridgeBase.BaseCrossChainParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"routerCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"srcInputToken","type":"address"},{"internalType":"uint256","name":"srcInputAmount","type":"uint256"},{"internalType":"uint256","name":"dstChainID","type":"uint256"},{"internalType":"address","name":"dstOutputToken","type":"address"},{"internalType":"uint256","name":"dstMinOutputAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"integrator","type":"address"},{"internalType":"address","name":"router","type":"address"}],"internalType":"struct BridgeBase.BaseCrossChainParams","name":"_params","type":"tuple"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"routerCallNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fixedCryptoFee","type":"uint256"}],"name":"setFixedCryptoFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_integrator","type":"address"},{"components":[{"internalType":"bool","name":"isIntegrator","type":"bool"},{"internalType":"uint32","name":"tokenFee","type":"uint32"},{"internalType":"uint32","name":"RubicTokenShare","type":"uint32"},{"internalType":"uint32","name":"RubicFixedCryptoShare","type":"uint32"},{"internalType":"uint128","name":"fixedFeeAmount","type":"uint128"}],"internalType":"struct BridgeBase.IntegratorFeeInfo","name":"_info","type":"tuple"}],"name":"setIntegratorInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_maxTokenAmount","type":"uint256"}],"name":"setMaxTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_minTokenAmount","type":"uint256"}],"name":"setMinTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_platformFee","type":"uint256"}],"name":"setRubicPlatformFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sweepTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162003f2f38038062003f2f833981016040819052620000349162000727565b6200004486868686868662000050565b50505050505062000809565b600054610100900460ff1615808015620000715750600054600160ff909116105b80620000a157506200008e306200018e60201b620016501760201c565b158015620000a1575060005460ff166001145b6200010a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156200012e576000805461ff0019166101001790555b6200013e8787878787876200019d565b801562000185576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6001600160a01b03163b151590565b600054610100900460ff16620001f95760405162461bcd60e51b815260206004820152602b602482015260008051602062003f0f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b6200020986868686868662000211565b505050505050565b600054610100900460ff166200026d5760405162461bcd60e51b815260206004820152602b602482015260008051602062003f0f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b620002776200043e565b610102869055620f4240851115620002a25760405163cd4e616760e01b815260040160405180910390fd5b610101859055835160005b81811015620002f857620002ee868281518110620002cf57620002cf620007f3565b6020026020010151610104620004a660201b6200166c1790919060201c565b50600101620002ad565b50835160005b8181101562000426578381815181106200031c576200031c620007f3565b6020026020010151858281518110620003395762000339620007f3565b60200260200101511115620003615760405163129c63a160e31b815260040160405180910390fd5b848181518110620003765762000376620007f3565b602002602001015160fd6000888481518110620003975762000397620007f3565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550838181518110620003d857620003d8620007f3565b602002602001015160fe6000888481518110620003f957620003f9620007f3565b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101620002fe565b5062000434600033620004c6565b5050505050505050565b600054610100900460ff166200049a5760405162461bcd60e51b815260206004820152602b602482015260008051602062003f0f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000101565b6097805460ff19169055565b6000620004bd836001600160a01b038416620004d6565b90505b92915050565b620004d2828262000528565b5050565b60008181526001830160205260408120546200051f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620004c0565b506000620004c0565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16620004d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200060d576200060d620005cc565b604052919050565b60006001600160401b03821115620006315762000631620005cc565b5060051b60200190565b600082601f8301126200064d57600080fd5b8151602062000666620006608362000615565b620005e2565b82815260059290921b840181019181810190868411156200068657600080fd5b8286015b84811015620006ba5780516001600160a01b0381168114620006ac5760008081fd5b83529183019183016200068a565b509695505050505050565b600082601f830112620006d757600080fd5b81516020620006ea620006608362000615565b82815260059290921b840181019181810190868411156200070a57600080fd5b8286015b84811015620006ba57805183529183019183016200070e565b60008060008060008060c087890312156200074157600080fd5b86516020880151604089015191975095506001600160401b03808211156200076857600080fd5b620007768a838b016200063b565b955060608901519150808211156200078d57600080fd5b6200079b8a838b016200063b565b94506080890151915080821115620007b257600080fd5b620007c08a838b01620006c5565b935060a0890151915080821115620007d757600080fd5b50620007e689828a01620006c5565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b6136f680620008196000396000f3fe6080604052600436106102535760003560e01c806375829def116101385780639e369235116100b0578063c75b3d411161007f578063dec6603611610064578063dec6603614610786578063e515ae40146107a6578063ec87621c146107b95761025a565b8063c75b3d411461074f578063d547741f146107665761025a565b80639e369235146106d6578063a217fddf146106ed578063beea8df814610702578063c4707686146107225761025a565b80637e903aa611610107578063859806cc116100ec578063859806cc1461064e57806391d148541461066357806395c54f5a146106b65761025a565b80637e903aa614610619578063825dc4151461062e5761025a565b806375829def146104e7578063772f8c2d1461050757806379e65062146105345780637cd5083f146105545761025a565b8063248a9ca3116101cb5780633f979a9a1161019a5780635c975abb1161017f5780635c975abb1461047657806369fe30e81461048e578063706bc66b146104c75761025a565b80633f979a9a1461043f57806348d8b9a41461045f5761025a565b8063248a9ca3146103ad5780632f2ff15d146103dd57806336568abe146103fd5780633a68ff831461041d5761025a565b806313a1667c116102225780631bceb8d4116102075780631bceb8d41461034b5780631e2c0314146103785780631f041ec6146103985761025a565b806313a1667c1461030b578063162dfb0d1461032b5761025a565b806301ffc9a71461026857806307598f621461029d5780630b6b2d42146102bd5780630f4fb373146102d05761025a565b3661025a57005b34801561026657600080fd5b005b34801561027457600080fd5b50610288610283366004612f84565b6107ed565b60405190151581526020015b60405180910390f35b3480156102a957600080fd5b506102666102b8366004612fef565b610886565b6102666102cb366004613065565b61090e565b3480156102dc57600080fd5b506102fd6102eb366004612fef565b60fe6020526000908152604090205481565b604051908152602001610294565b34801561031757600080fd5b50610266610326366004612fef565b610b62565b34801561033757600080fd5b506102666103463660046130bb565b610b7a565b34801561035757600080fd5b506102fd610366366004612fef565b60fd6020526000908152604090205481565b34801561038457600080fd5b506102666103933660046130e5565b610b8c565b3480156103a457600080fd5b50610266610b9a565b3480156103b957600080fd5b506102fd6103c83660046130e5565b60009081526065602052604090206001015490565b3480156103e957600080fd5b506102666103f83660046130fe565b610bac565b34801561040957600080fd5b506102666104183660046130fe565b610bd6565b34801561042957600080fd5b50610432610c85565b6040516102949190613121565b34801561044b57600080fd5b5061026661045a36600461317b565b610c97565b34801561046b57600080fd5b506102fd6101025481565b34801561048257600080fd5b5060975460ff16610288565b34801561049a57600080fd5b506102fd6104a93660046130bb565b61010060209081526000928352604080842090915290825290205481565b3480156104d357600080fd5b506102666104e2366004612fef565b610d27565b3480156104f357600080fd5b50610266610502366004612fef565b610d88565b34801561051357600080fd5b506102fd610522366004612fef565b60fc6020526000908152604090205481565b34801561054057600080fd5b5061026661054f36600461317b565b610da9565b34801561056057600080fd5b506105d261056f366004612fef565b60fb6020526000908152604090205460ff81169063ffffffff61010082048116916501000000000081048216916901000000000000000000820416906fffffffffffffffffffffffffffffffff6d01000000000000000000000000009091041685565b60408051951515865263ffffffff94851660208701529284169285019290925290911660608301526fffffffffffffffffffffffffffffffff16608082015260a001610294565b34801561062557600080fd5b50610266610e39565b34801561063a57600080fd5b50610266610649366004613221565b610e93565b34801561065a57600080fd5b50610266611097565b34801561066f57600080fd5b5061028861067e3660046130fe565b600091825260656020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b3480156106c257600080fd5b506102666106d13660046130e5565b6110a7565b3480156106e257600080fd5b506102fd6101035481565b3480156106f957600080fd5b506102fd600081565b34801561070e57600080fd5b5061026661071d366004612fef565b6110f2565b34801561072e57600080fd5b506102fd61073d366004612fef565b60ff6020526000908152604090205481565b34801561075b57600080fd5b506102fd6101015481565b34801561077257600080fd5b506102666107813660046130fe565b6111dd565b34801561079257600080fd5b506102666107a136600461317b565b611202565b6102666107b436600461331b565b611215565b3480156107c557600080fd5b506102fd7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061088057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600260c954036108f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260c9556109063382611695565b50600160c955565b600260c9540361097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c95561098761182c565b826109a561099c610100830160e08401612fef565b61010490611899565b6109db576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060fb816109f060e0880160c08901612fef565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120825160a081018452905460ff811615158252610100810463ffffffff908116958301959095526501000000000081048516938201939093526901000000000000000000830490931660608401526d01000000000000000000000000009091046fffffffffffffffffffffffffffffffff166080830152909150610ac9610aa760e0880160c08901612fef565b83610ac1610abb60e08b0160c08c01612fef565b866118c8565b6000806119f4565b9050610b1d610adf610100880160e08901612fef565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250611b42915050565b5050507f8374070d1462c8a234009e6e373359e53125a166122074cb0fa8fb984c4b0bfa81604051610b4f9190613380565b60405180910390a15050600160c9555050565b610b6a611b70565b610b7661010482611c11565b5050565b610b82611b70565b610b768282611695565b610b94611b70565b61010255565b610ba2611b70565b610baa611c33565b565b600082815260656020526040902060010154610bc781611cb8565b610bd18383611cc2565b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108ee565b610b768282611db6565b6060610c92610104611e71565b905090565b610c9f611b70565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fd6020526040902054811015610cfe576040517fb213476a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fe6020526040902055565b610d2f611b70565b73ffffffffffffffffffffffffffffffffffffffff8116610d7c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b766101048261166c565b610d90611e7e565b610d9b600033611db6565b610da6600082611cc2565b50565b610db1611b70565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fe6020526040902054811115610e10576040517f94e31d0800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fd6020526040902055565b610e41611b70565b610103805460009182905590610e58908233611ee6565b604080518281523360208201527f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a150565b610e9b611b70565b620f4240816020015163ffffffff161115610ee2576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620f4240816040015163ffffffff161180610f095750620f4240816060015163ffffffff16115b15610f40576040517f2a07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fb602090815260409182902083518154928501519385015160608601516080909601516fffffffffffffffffffffffffffffffff166d0100000000000000000000000000027fffffff00000000000000000000000000000000ffffffffffffffffffffffffff63ffffffff9788166901000000000000000000027fffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffff9389166501000000000002939093167fffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffff98909716610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616959095179290921795909516939093179390931716179055565b61109f611b70565b610baa611f2c565b6110af611b70565b620f42408111156110ec576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010155565b6110fa611b70565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260ff60205260408120549081900361115a576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260ff602052604081205561118b828233611ee6565b6040805182815273ffffffffffffffffffffffffffffffffffffffff841660208201527f9216fa2f918153a5852ce98e7929c12cd94e0adeda8117f80e761c216157b27c910160405180910390a15050565b6000828152606560205260409020600101546111f881611cb8565b610bd18383611db6565b61120a611e7e565b610b76828233611ee6565b600260c95403611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c95561128e61182c565b836112a361099c610100830160e08401612fef565b80156112b657506112b661010485611899565b6112ec576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611320333060208801803590611302908a612fef565b73ffffffffffffffffffffffffffffffffffffffff16929190611f83565b600060fb8161133560e0890160c08a01612fef565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120825160a081018452905460ff811615158252610100810463ffffffff908116958301959095526501000000000081048516938201939093526901000000000000000000830490931660608401526d01000000000000000000000000009091046fffffffffffffffffffffffffffffffff1660808301529091506114066113ec60e0890160c08a01612fef565b8360208a01803590600090611401908d612fef565b6119f4565b905061141f6114186020890189612fef565b8288612065565b600061142e6020890189612fef565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa15801561149a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114be9190613418565b905061152a6114d46101008a0160e08b01612fef565b87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611525925061151f91505060e08d0160c08e01612fef565b876118c8565b611b42565b508161153960208a018a612fef565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa1580156115a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c99190613418565b6115d39083613460565b1461160a576040517f119e050500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050507f8374070d1462c8a234009e6e373359e53125a166122074cb0fa8fb984c4b0bfa8160405161163c9190613380565b60405180910390a15050600160c955505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b600061168e8373ffffffffffffffffffffffffffffffffffffffff84166122cd565b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff821661171a575073ffffffffffffffffffffffffffffffffffffffff8216600081815260fc60209081526040808320805493905580518381529182019390935290917f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a15b73ffffffffffffffffffffffffffffffffffffffff808316600090815261010060209081526040808320938716835292905220546117589082613473565b905080600003611794576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8083166000908152610100602090815260408083209387168352929052908120556117d5828285611ee6565b6040805182815273ffffffffffffffffffffffffffffffffffffffff84811660208301528516917f6f83ca8ce48e63b2a223b9f9e7ef1ea7bf3a8385c7a9bd63baae22963b2b26e0910160405180910390a2505050565b60975460ff1615610baa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108ee565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561168e565b60008060008360000151156119665760808401516fffffffffffffffffffffffffffffffff169150811561196157620f4240846060015163ffffffff16836119109190613486565b61191a91906134c3565b90506119268183613460565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260fc60205260408120805490919061195b908490613473565b90915550505b61196e565b505061010254805b8061010360008282546119819190613473565b909155505073ffffffffffffffffffffffffffffffffffffffff85167f3a84e53f89d2f7779a9c9a54779858ae0eb0b7760d607b445b6fd175c30a04d4826119c98186613460565b6040805192835260208301919091520160405180910390a26119eb8234613460565b95945050505050565b6000806000611a0487878761231c565b909250905073ffffffffffffffffffffffffffffffffffffffff881615611a7a57611a2f8183613460565b73ffffffffffffffffffffffffffffffffffffffff808616600090815261010060209081526040808320938d1683529290529081208054909190611a74908490613473565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8416600090815260ff602052604081208054839290611aaf908490613473565b909155505073ffffffffffffffffffffffffffffffffffffffff88167f25471ec9f39b4ceb20d58f63c37f9c738011f0babcc4b6af69bdd82984ca5f8e82611af78186613460565b60408051928352602083019190915273ffffffffffffffffffffffffffffffffffffffff88169082015260600160405180910390a2611b368287613460565b98975050505050505050565b6060611b688484846040518060600160405280602981526020016136c16029913961235c565b949350505050565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1680611bdb57503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff165b610baa576040517fe92bcd1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061168e8373ffffffffffffffffffffffffffffffffffffffff84166124f2565b611c3b61182c565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c8e3390565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b610da681336125e5565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b7657600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611d583390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610b7657600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060600061168e836126b7565b3360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16610baa576040517f55098f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611f0b57610bd18183612713565b610bd173ffffffffffffffffffffffffffffffffffffffff8416828461286d565b611f346128c3565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611c8e565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261205f9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261292f565b50505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8281166024830152849160009183169063dd62ed3e90604401602060405180830381865afa1580156120dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121009190613418565b9050838110156122c657806000036121585761215373ffffffffffffffffffffffffffffffffffffffff8316847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612a3b565b6122c6565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015283169063095ea7b3906044016020604051808303816000875af1925050508015612226575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612223918101906134fe565b60015b61228d5761224c73ffffffffffffffffffffffffffffffffffffffff8316846000612a3b565b61215373ffffffffffffffffffffffffffffffffffffffff8316847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612a3b565b806122c4576040517f3e3f8f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b5050505050565b600081815260018301602052604081205461231457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610880565b506000610880565b60008084600001511561233d576123338486612bbd565b9092509050612354565b61234e8461010154620f4240612c0f565b91508190505b935093915050565b6060824710156123ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108ee565b73ffffffffffffffffffffffffffffffffffffffff85163b61246c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108ee565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612495919061353f565b60006040518083038185875af1925050503d80600081146124d2576040519150601f19603f3d011682016040523d82523d6000602084013e6124d7565b606091505b50915091506124e7828286612cdf565b979650505050505050565b600081815260018301602052604081205480156125db576000612516600183613460565b855490915060009061252a90600190613460565b905081811461258f57600086600001828154811061254a5761254a61355b565b906000526020600020015490508087600001848154811061256d5761256d61355b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125a0576125a061358a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610880565b6000915050610880565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b765761263d8173ffffffffffffffffffffffffffffffffffffffff166014612d32565b612648836020612d32565b6040516020016126599291906135b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108ee9160040161363a565b60608160000180548060200260200160405190810160405280929190818152602001828054801561270757602002820191906000526020600020905b8154815260200190600101908083116126f3575b50505050509050919050565b8047101561277d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108ee565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146127d7576040519150601f19603f3d011682016040523d82523d6000602084013e6127dc565b606091505b5050905080610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bd19084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611fdd565b60975460ff16610baa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108ee565b6000612991826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f759092919063ffffffff16565b805190915015610bd157808060200190518101906129af91906134fe565b610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108ee565b801580612adb57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612ab5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad99190613418565b155b612b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bd19084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611fdd565b6000806000836020015163ffffffff161115612c0857612beb84846020015163ffffffff16620f4240612c0f565b9150612c0582846040015163ffffffff16620f4240612c0f565b90505b9250929050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870985870292508281108382030391505080600003612c665760008411612c5b57600080fd5b50829004905061168e565b808411612c7257600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b60608315612cee57508161168e565b825115612cfe5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ee919061363a565b60606000612d41836002613486565b612d4c906002613473565b67ffffffffffffffff811115612d6457612d646131a5565b6040519080825280601f01601f191660200182016040528015612d8e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612dc557612dc561355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612e2857612e2861355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612e64846002613486565b612e6f906001613473565b90505b6001811115612f0c577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612eb057612eb061355b565b1a60f81b828281518110612ec657612ec661355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612f058161368b565b9050612e72565b50831561168e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ee565b6060611b68848460008561235c565b600060208284031215612f9657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461168e57600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114612fea57600080fd5b919050565b60006020828403121561300157600080fd5b61168e82612fc6565b6000610100828403121561301d57600080fd5b50919050565b60008083601f84011261303557600080fd5b50813567ffffffffffffffff81111561304d57600080fd5b602083019150836020828501011115612c0857600080fd5b6000806000610120848603121561307b57600080fd5b613085858561300a565b925061010084013567ffffffffffffffff8111156130a257600080fd5b6130ae86828701613023565b9497909650939450505050565b600080604083850312156130ce57600080fd5b6130d783612fc6565b9150612c0560208401612fc6565b6000602082840312156130f757600080fd5b5035919050565b6000806040838503121561311157600080fd5b82359150612c0560208401612fc6565b6020808252825182820181905260009190848201906040850190845b8181101561316f57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161313d565b50909695505050505050565b6000806040838503121561318e57600080fd5b61319783612fc6565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610da657600080fd5b8035612fea816131d4565b803563ffffffff81168114612fea57600080fd5b80356fffffffffffffffffffffffffffffffff81168114612fea57600080fd5b60008082840360c081121561323557600080fd5b61323e84612fc6565b925060a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561327057600080fd5b5060405160a0810181811067ffffffffffffffff821117156132bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526132ca602085016131e2565b81526132d8604085016131ed565b60208201526132e9606085016131ed565b60408201526132fa608085016131ed565b606082015261330b60a08501613201565b6080820152809150509250929050565b600080600080610140858703121561333257600080fd5b61333c868661300a565b935061334b6101008601612fc6565b925061012085013567ffffffffffffffff81111561336857600080fd5b61337487828801613023565b95989497509550505050565b610100810173ffffffffffffffffffffffffffffffffffffffff806133a485612fc6565b1683526020840135602084015260408401356040840152806133c860608601612fc6565b16606084015260808401356080840152806133e560a08601612fc6565b1660a0840152806133f860c08601612fc6565b1660c08401528061340b60e08601612fc6565b1660e08401525092915050565b60006020828403121561342a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561088057610880613431565b8082018082111561088057610880613431565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134be576134be613431565b500290565b6000826134f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561351057600080fd5b815161168e816131d4565b60005b8381101561353657818101518382015260200161351e565b50506000910152565b6000825161355181846020870161351b565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516135f181601785016020880161351b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161362e81602884016020880161351b565b01602801949350505050565b602081526000825180602084015261365981604085016020870161351b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008161369a5761369a613431565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a164736f6c6343000810000a496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420690000000000000000000000000000000000000000000000000002348577319393000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c251000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c1500000000000000000000000003b7551eb0162c838a10c2437b60d1f5455b9554000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102535760003560e01c806375829def116101385780639e369235116100b0578063c75b3d411161007f578063dec6603611610064578063dec6603614610786578063e515ae40146107a6578063ec87621c146107b95761025a565b8063c75b3d411461074f578063d547741f146107665761025a565b80639e369235146106d6578063a217fddf146106ed578063beea8df814610702578063c4707686146107225761025a565b80637e903aa611610107578063859806cc116100ec578063859806cc1461064e57806391d148541461066357806395c54f5a146106b65761025a565b80637e903aa614610619578063825dc4151461062e5761025a565b806375829def146104e7578063772f8c2d1461050757806379e65062146105345780637cd5083f146105545761025a565b8063248a9ca3116101cb5780633f979a9a1161019a5780635c975abb1161017f5780635c975abb1461047657806369fe30e81461048e578063706bc66b146104c75761025a565b80633f979a9a1461043f57806348d8b9a41461045f5761025a565b8063248a9ca3146103ad5780632f2ff15d146103dd57806336568abe146103fd5780633a68ff831461041d5761025a565b806313a1667c116102225780631bceb8d4116102075780631bceb8d41461034b5780631e2c0314146103785780631f041ec6146103985761025a565b806313a1667c1461030b578063162dfb0d1461032b5761025a565b806301ffc9a71461026857806307598f621461029d5780630b6b2d42146102bd5780630f4fb373146102d05761025a565b3661025a57005b34801561026657600080fd5b005b34801561027457600080fd5b50610288610283366004612f84565b6107ed565b60405190151581526020015b60405180910390f35b3480156102a957600080fd5b506102666102b8366004612fef565b610886565b6102666102cb366004613065565b61090e565b3480156102dc57600080fd5b506102fd6102eb366004612fef565b60fe6020526000908152604090205481565b604051908152602001610294565b34801561031757600080fd5b50610266610326366004612fef565b610b62565b34801561033757600080fd5b506102666103463660046130bb565b610b7a565b34801561035757600080fd5b506102fd610366366004612fef565b60fd6020526000908152604090205481565b34801561038457600080fd5b506102666103933660046130e5565b610b8c565b3480156103a457600080fd5b50610266610b9a565b3480156103b957600080fd5b506102fd6103c83660046130e5565b60009081526065602052604090206001015490565b3480156103e957600080fd5b506102666103f83660046130fe565b610bac565b34801561040957600080fd5b506102666104183660046130fe565b610bd6565b34801561042957600080fd5b50610432610c85565b6040516102949190613121565b34801561044b57600080fd5b5061026661045a36600461317b565b610c97565b34801561046b57600080fd5b506102fd6101025481565b34801561048257600080fd5b5060975460ff16610288565b34801561049a57600080fd5b506102fd6104a93660046130bb565b61010060209081526000928352604080842090915290825290205481565b3480156104d357600080fd5b506102666104e2366004612fef565b610d27565b3480156104f357600080fd5b50610266610502366004612fef565b610d88565b34801561051357600080fd5b506102fd610522366004612fef565b60fc6020526000908152604090205481565b34801561054057600080fd5b5061026661054f36600461317b565b610da9565b34801561056057600080fd5b506105d261056f366004612fef565b60fb6020526000908152604090205460ff81169063ffffffff61010082048116916501000000000081048216916901000000000000000000820416906fffffffffffffffffffffffffffffffff6d01000000000000000000000000009091041685565b60408051951515865263ffffffff94851660208701529284169285019290925290911660608301526fffffffffffffffffffffffffffffffff16608082015260a001610294565b34801561062557600080fd5b50610266610e39565b34801561063a57600080fd5b50610266610649366004613221565b610e93565b34801561065a57600080fd5b50610266611097565b34801561066f57600080fd5b5061028861067e3660046130fe565b600091825260656020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b3480156106c257600080fd5b506102666106d13660046130e5565b6110a7565b3480156106e257600080fd5b506102fd6101035481565b3480156106f957600080fd5b506102fd600081565b34801561070e57600080fd5b5061026661071d366004612fef565b6110f2565b34801561072e57600080fd5b506102fd61073d366004612fef565b60ff6020526000908152604090205481565b34801561075b57600080fd5b506102fd6101015481565b34801561077257600080fd5b506102666107813660046130fe565b6111dd565b34801561079257600080fd5b506102666107a136600461317b565b611202565b6102666107b436600461331b565b611215565b3480156107c557600080fd5b506102fd7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061088057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600260c954036108f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260c9556109063382611695565b50600160c955565b600260c9540361097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c95561098761182c565b826109a561099c610100830160e08401612fef565b61010490611899565b6109db576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060fb816109f060e0880160c08901612fef565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120825160a081018452905460ff811615158252610100810463ffffffff908116958301959095526501000000000081048516938201939093526901000000000000000000830490931660608401526d01000000000000000000000000009091046fffffffffffffffffffffffffffffffff166080830152909150610ac9610aa760e0880160c08901612fef565b83610ac1610abb60e08b0160c08c01612fef565b866118c8565b6000806119f4565b9050610b1d610adf610100880160e08901612fef565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250611b42915050565b5050507f8374070d1462c8a234009e6e373359e53125a166122074cb0fa8fb984c4b0bfa81604051610b4f9190613380565b60405180910390a15050600160c9555050565b610b6a611b70565b610b7661010482611c11565b5050565b610b82611b70565b610b768282611695565b610b94611b70565b61010255565b610ba2611b70565b610baa611c33565b565b600082815260656020526040902060010154610bc781611cb8565b610bd18383611cc2565b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108ee565b610b768282611db6565b6060610c92610104611e71565b905090565b610c9f611b70565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fd6020526040902054811015610cfe576040517fb213476a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fe6020526040902055565b610d2f611b70565b73ffffffffffffffffffffffffffffffffffffffff8116610d7c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b766101048261166c565b610d90611e7e565b610d9b600033611db6565b610da6600082611cc2565b50565b610db1611b70565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260fe6020526040902054811115610e10576040517f94e31d0800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fd6020526040902055565b610e41611b70565b610103805460009182905590610e58908233611ee6565b604080518281523360208201527f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a150565b610e9b611b70565b620f4240816020015163ffffffff161115610ee2576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620f4240816040015163ffffffff161180610f095750620f4240816060015163ffffffff16115b15610f40576040517f2a07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260fb602090815260409182902083518154928501519385015160608601516080909601516fffffffffffffffffffffffffffffffff166d0100000000000000000000000000027fffffff00000000000000000000000000000000ffffffffffffffffffffffffff63ffffffff9788166901000000000000000000027fffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffff9389166501000000000002939093167fffffffffffffffffffffffffffffffffffffff0000000000000000ffffffffff98909716610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616959095179290921795909516939093179390931716179055565b61109f611b70565b610baa611f2c565b6110af611b70565b620f42408111156110ec576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61010155565b6110fa611b70565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260ff60205260408120549081900361115a576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260ff602052604081205561118b828233611ee6565b6040805182815273ffffffffffffffffffffffffffffffffffffffff841660208201527f9216fa2f918153a5852ce98e7929c12cd94e0adeda8117f80e761c216157b27c910160405180910390a15050565b6000828152606560205260409020600101546111f881611cb8565b610bd18383611db6565b61120a611e7e565b610b76828233611ee6565b600260c95403611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ee565b600260c95561128e61182c565b836112a361099c610100830160e08401612fef565b80156112b657506112b661010485611899565b6112ec576040517f91127ab800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611320333060208801803590611302908a612fef565b73ffffffffffffffffffffffffffffffffffffffff16929190611f83565b600060fb8161133560e0890160c08a01612fef565b73ffffffffffffffffffffffffffffffffffffffff16815260208082019290925260409081016000908120825160a081018452905460ff811615158252610100810463ffffffff908116958301959095526501000000000081048516938201939093526901000000000000000000830490931660608401526d01000000000000000000000000009091046fffffffffffffffffffffffffffffffff1660808301529091506114066113ec60e0890160c08a01612fef565b8360208a01803590600090611401908d612fef565b6119f4565b905061141f6114186020890189612fef565b8288612065565b600061142e6020890189612fef565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa15801561149a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114be9190613418565b905061152a6114d46101008a0160e08b01612fef565b87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611525925061151f91505060e08d0160c08e01612fef565b876118c8565b611b42565b508161153960208a018a612fef565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa1580156115a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c99190613418565b6115d39083613460565b1461160a576040517f119e050500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050507f8374070d1462c8a234009e6e373359e53125a166122074cb0fa8fb984c4b0bfa8160405161163c9190613380565b60405180910390a15050600160c955505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b600061168e8373ffffffffffffffffffffffffffffffffffffffff84166122cd565b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff821661171a575073ffffffffffffffffffffffffffffffffffffffff8216600081815260fc60209081526040808320805493905580518381529182019390935290917f445ea353dd3cfa91aaa8ea899f31ffb4d03e783c45f0ef3717b46c32ea17969d910160405180910390a15b73ffffffffffffffffffffffffffffffffffffffff808316600090815261010060209081526040808320938716835292905220546117589082613473565b905080600003611794576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8083166000908152610100602090815260408083209387168352929052908120556117d5828285611ee6565b6040805182815273ffffffffffffffffffffffffffffffffffffffff84811660208301528516917f6f83ca8ce48e63b2a223b9f9e7ef1ea7bf3a8385c7a9bd63baae22963b2b26e0910160405180910390a2505050565b60975460ff1615610baa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016108ee565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561168e565b60008060008360000151156119665760808401516fffffffffffffffffffffffffffffffff169150811561196157620f4240846060015163ffffffff16836119109190613486565b61191a91906134c3565b90506119268183613460565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260fc60205260408120805490919061195b908490613473565b90915550505b61196e565b505061010254805b8061010360008282546119819190613473565b909155505073ffffffffffffffffffffffffffffffffffffffff85167f3a84e53f89d2f7779a9c9a54779858ae0eb0b7760d607b445b6fd175c30a04d4826119c98186613460565b6040805192835260208301919091520160405180910390a26119eb8234613460565b95945050505050565b6000806000611a0487878761231c565b909250905073ffffffffffffffffffffffffffffffffffffffff881615611a7a57611a2f8183613460565b73ffffffffffffffffffffffffffffffffffffffff808616600090815261010060209081526040808320938d1683529290529081208054909190611a74908490613473565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8416600090815260ff602052604081208054839290611aaf908490613473565b909155505073ffffffffffffffffffffffffffffffffffffffff88167f25471ec9f39b4ceb20d58f63c37f9c738011f0babcc4b6af69bdd82984ca5f8e82611af78186613460565b60408051928352602083019190915273ffffffffffffffffffffffffffffffffffffffff88169082015260600160405180910390a2611b368287613460565b98975050505050505050565b6060611b688484846040518060600160405280602981526020016136c16029913961235c565b949350505050565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1680611bdb57503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff165b610baa576040517fe92bcd1400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061168e8373ffffffffffffffffffffffffffffffffffffffff84166124f2565b611c3b61182c565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c8e3390565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b610da681336125e5565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b7657600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055611d583390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610b7657600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060600061168e836126b7565b3360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16610baa576040517f55098f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611f0b57610bd18183612713565b610bd173ffffffffffffffffffffffffffffffffffffffff8416828461286d565b611f346128c3565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611c8e565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261205f9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261292f565b50505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8281166024830152849160009183169063dd62ed3e90604401602060405180830381865afa1580156120dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121009190613418565b9050838110156122c657806000036121585761215373ffffffffffffffffffffffffffffffffffffffff8316847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612a3b565b6122c6565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015283169063095ea7b3906044016020604051808303816000875af1925050508015612226575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612223918101906134fe565b60015b61228d5761224c73ffffffffffffffffffffffffffffffffffffffff8316846000612a3b565b61215373ffffffffffffffffffffffffffffffffffffffff8316847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612a3b565b806122c4576040517f3e3f8f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b5050505050565b600081815260018301602052604081205461231457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610880565b506000610880565b60008084600001511561233d576123338486612bbd565b9092509050612354565b61234e8461010154620f4240612c0f565b91508190505b935093915050565b6060824710156123ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108ee565b73ffffffffffffffffffffffffffffffffffffffff85163b61246c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108ee565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612495919061353f565b60006040518083038185875af1925050503d80600081146124d2576040519150601f19603f3d011682016040523d82523d6000602084013e6124d7565b606091505b50915091506124e7828286612cdf565b979650505050505050565b600081815260018301602052604081205480156125db576000612516600183613460565b855490915060009061252a90600190613460565b905081811461258f57600086600001828154811061254a5761254a61355b565b906000526020600020015490508087600001848154811061256d5761256d61355b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806125a0576125a061358a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610880565b6000915050610880565b600082815260656020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610b765761263d8173ffffffffffffffffffffffffffffffffffffffff166014612d32565b612648836020612d32565b6040516020016126599291906135b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108ee9160040161363a565b60608160000180548060200260200160405190810160405280929190818152602001828054801561270757602002820191906000526020600020905b8154815260200190600101908083116126f3575b50505050509050919050565b8047101561277d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108ee565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146127d7576040519150601f19603f3d011682016040523d82523d6000602084013e6127dc565b606091505b5050905080610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bd19084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611fdd565b60975460ff16610baa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016108ee565b6000612991826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f759092919063ffffffff16565b805190915015610bd157808060200190518101906129af91906134fe565b610bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108ee565b801580612adb57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612ab5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad99190613418565b155b612b67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016108ee565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610bd19084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611fdd565b6000806000836020015163ffffffff161115612c0857612beb84846020015163ffffffff16620f4240612c0f565b9150612c0582846040015163ffffffff16620f4240612c0f565b90505b9250929050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870985870292508281108382030391505080600003612c665760008411612c5b57600080fd5b50829004905061168e565b808411612c7257600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b60608315612cee57508161168e565b825115612cfe5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ee919061363a565b60606000612d41836002613486565b612d4c906002613473565b67ffffffffffffffff811115612d6457612d646131a5565b6040519080825280601f01601f191660200182016040528015612d8e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612dc557612dc561355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612e2857612e2861355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612e64846002613486565b612e6f906001613473565b90505b6001811115612f0c577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612eb057612eb061355b565b1a60f81b828281518110612ec657612ec661355b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612f058161368b565b9050612e72565b50831561168e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ee565b6060611b68848460008561235c565b600060208284031215612f9657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461168e57600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114612fea57600080fd5b919050565b60006020828403121561300157600080fd5b61168e82612fc6565b6000610100828403121561301d57600080fd5b50919050565b60008083601f84011261303557600080fd5b50813567ffffffffffffffff81111561304d57600080fd5b602083019150836020828501011115612c0857600080fd5b6000806000610120848603121561307b57600080fd5b613085858561300a565b925061010084013567ffffffffffffffff8111156130a257600080fd5b6130ae86828701613023565b9497909650939450505050565b600080604083850312156130ce57600080fd5b6130d783612fc6565b9150612c0560208401612fc6565b6000602082840312156130f757600080fd5b5035919050565b6000806040838503121561311157600080fd5b82359150612c0560208401612fc6565b6020808252825182820181905260009190848201906040850190845b8181101561316f57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161313d565b50909695505050505050565b6000806040838503121561318e57600080fd5b61319783612fc6565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610da657600080fd5b8035612fea816131d4565b803563ffffffff81168114612fea57600080fd5b80356fffffffffffffffffffffffffffffffff81168114612fea57600080fd5b60008082840360c081121561323557600080fd5b61323e84612fc6565b925060a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561327057600080fd5b5060405160a0810181811067ffffffffffffffff821117156132bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526132ca602085016131e2565b81526132d8604085016131ed565b60208201526132e9606085016131ed565b60408201526132fa608085016131ed565b606082015261330b60a08501613201565b6080820152809150509250929050565b600080600080610140858703121561333257600080fd5b61333c868661300a565b935061334b6101008601612fc6565b925061012085013567ffffffffffffffff81111561336857600080fd5b61337487828801613023565b95989497509550505050565b610100810173ffffffffffffffffffffffffffffffffffffffff806133a485612fc6565b1683526020840135602084015260408401356040840152806133c860608601612fc6565b16606084015260808401356080840152806133e560a08601612fc6565b1660a0840152806133f860c08601612fc6565b1660c08401528061340b60e08601612fc6565b1660e08401525092915050565b60006020828403121561342a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561088057610880613431565b8082018082111561088057610880613431565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134be576134be613431565b500290565b6000826134f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561351057600080fd5b815161168e816131d4565b60005b8381101561353657818101518382015260200161351e565b50506000910152565b6000825161355181846020870161351b565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516135f181601785016020880161351b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161362e81602884016020880161351b565b01602801949350505050565b602081526000825180602084015261365981604085016020870161351b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008161369a5761369a613431565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a164736f6c6343000810000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000002348577319393000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c251000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c1500000000000000000000000003b7551eb0162c838a10c2437b60d1f5455b9554000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _fixedCryptoFee (uint256): 620697788453779
Arg [1] : _RubicPlatformFee (uint256): 0
Arg [2] : _routers (address[]): 0x663DC15D3C1aC63ff12E45Ab68FeA3F0a883C251,0x362fA9D0bCa5D19f743Db50738345ce2b40eC99f,0xB9E13785127BFfCc3dc970A55F6c7bF0844a3C15,0x03B7551EB0162c838a10c2437b60D1f5455b9554
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000002348577319393
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c251
Arg [8] : 000000000000000000000000362fa9d0bca5d19f743db50738345ce2b40ec99f
Arg [9] : 000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c15
Arg [10] : 00000000000000000000000003b7551eb0162c838a10c2437b60d1f5455b9554
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 29.22% | $521.78 | 0.0544 | $28.37 | |
BSC | 0.70% | $1 | 0.6817 | $0.682 | |
BSC | 0.70% | $0.999995 | 0.675 | $0.6749 | |
BSC | 0.33% | $0.077892 | 4.1479 | $0.323 | |
BSC | 0.29% | $0.000058 | 4,829.1845 | $0.278 | |
BSC | 0.20% | $2,383.84 | 0.00007987 | $0.1903 | |
FTM | 21.69% | $0.501466 | 42.003 | $21.06 | |
FTM | 0.24% | $0.008638 | 27 | $0.2332 | |
MOVR | 13.70% | $9.28 | 1.4338 | $13.3 | |
ETH | 12.97% | $2,388.04 | 0.005274 | $12.59 | |
ARB | 8.65% | $2,388.7 | 0.003516 | $8.4 | |
GNO | 5.18% | $0.99995 | 5.025 | $5.02 | |
CRONOS | 5.01% | $0.080228 | 60.688 | $4.87 | |
AVAX | 1.12% | $24.53 | 0.0445 | $1.09 |
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.