0%
HomeSmart contracts
AnyswapV6ERC20

AnyswapV6ERC20

Deploy on Alchemy
    Verified
  • Verified, Router
  • Router

The following smart contract is an implementation of the ERC20 token standard with additional functionality for swapping tokens. It includes features such as setting a vault address, adding and revoking minters, and swapping tokens in and out of the contract. The contract also uses SafeERC20 library for safe token transfers.

0x7b4328c127b85369d9f82ca0503b000d09cf9180
Copied
Copied
AnyswapV6ERC20 Source Code
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.2; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 &amp;&amp; codehash != accountHash); } } library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { 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 callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract AnyswapV6ERC20 is IERC20 { using SafeERC20 for IERC20; string public name; string public symbol; uint8 public immutable override decimals; address public immutable underlying; bool public constant underlyingIsMinted = false; /// @dev Records amount of AnyswapV6ERC20 token owned by account. mapping (address => uint256) public override balanceOf; uint256 private _totalSupply; // init flag for setting immediate vault, needed for CREATE2 support bool private _init; // flag to enable/disable swapout vs vault.burn so multiple events are triggered bool private _vaultOnly; // delay for timelock functions uint public constant DELAY = 2 days; // set of minters, can be this bridge or other bridges mapping(address => bool) public isMinter; address[] public minters; // primary controller of the token contract address public vault; address public pendingMinter; uint public delayMinter; address public pendingVault; uint public delayVault; modifier onlyAuth() { require(isMinter[msg.sender], "AnyswapV6ERC20: FORBIDDEN"); _; } modifier onlyVault() { require(msg.sender == vault, "AnyswapV6ERC20: FORBIDDEN"); _; } function owner() external view returns (address) { return vault; } function mpc() external view returns (address) { return vault; } function setVaultOnly(bool enabled) external onlyVault { _vaultOnly = enabled; } function initVault(address _vault) external onlyVault { require(_init); _init = false; vault = _vault; isMinter[_vault] = true; minters.push(_vault); } function setVault(address _vault) external onlyVault { require(_vault != address(0), "AnyswapV6ERC20: address(0)"); pendingVault = _vault; delayVault = block.timestamp + DELAY; } function applyVault() external onlyVault { require(pendingVault != address(0) &amp;&amp; block.timestamp >= delayVault); vault = pendingVault; pendingVault = address(0); delayVault = 0; } function setMinter(address _auth) external onlyVault { require(_auth != address(0), "AnyswapV6ERC20: address(0)"); pendingMinter = _auth; delayMinter = block.timestamp + DELAY; } function applyMinter() external onlyVault { require(pendingMinter != address(0) &amp;&amp; block.timestamp >= delayMinter); isMinter[pendingMinter] = true; minters.push(pendingMinter); pendingMinter = address(0); delayMinter = 0; } // No time delay revoke minter emergency function function revokeMinter(address _auth) external onlyVault { isMinter[_auth] = false; } function getAllMinters() external view returns (address[] memory) { return minters; } function changeVault(address newVault) external onlyVault returns (bool) { require(newVault != address(0), "AnyswapV6ERC20: address(0)"); emit LogChangeVault(vault, newVault, block.timestamp); vault = newVault; pendingVault = address(0); delayVault = 0; return true; } function mint(address to, uint256 amount) external onlyAuth returns (bool) { _mint(to, amount); return true; } function burn(address from, uint256 amount) external onlyAuth returns (bool) { _burn(from, amount); return true; } function Swapin(bytes32 txhash, address account, uint256 amount) external onlyAuth returns (bool) { if (underlying != address(0) &amp;&amp; IERC20(underlying).balanceOf(address(this)) >= amount) { IERC20(underlying).safeTransfer(account, amount); } else { _mint(account, amount); } emit LogSwapin(txhash, account, amount); return true; } function Swapout(uint256 amount, address bindaddr) external returns (bool) { require(!_vaultOnly, "AnyswapV6ERC20: vaultOnly"); require(bindaddr != address(0), "AnyswapV6ERC20: address(0)"); if (underlying != address(0) &amp;&amp; balanceOf[msg.sender] < amount) { IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); } else { _burn(msg.sender, amount); } emit LogSwapout(msg.sender, bindaddr, amount); return true; } /// @dev Records number of AnyswapV6ERC20 token that account (second) will be allowed to spend on behalf of another account (first) through {transferFrom}. mapping (address => mapping (address => uint256)) public override allowance; event LogChangeVault(address indexed oldVault, address indexed newVault, uint indexed effectiveTime); event LogSwapin(bytes32 indexed txhash, address indexed account, uint amount); event LogSwapout(address indexed account, address indexed bindaddr, uint amount); constructor(string memory _name, string memory _symbol, uint8 _decimals, address _underlying, address _vault) { name = _name; symbol = _symbol; decimals = _decimals; underlying = _underlying; if (_underlying != address(0)) { require(_decimals == IERC20(_underlying).decimals()); } // Use init to allow for CREATE2 accross all chains _init = true; // Disable/Enable swapout for v1 tokens vs mint/burn for v3 tokens _vaultOnly = false; vault = _vault; } /// @dev Returns the total supply of AnyswapV6ERC20 token as the ETH held in this contract. function totalSupply() external view override returns (uint256) { return _totalSupply; } function deposit() external returns (uint) { uint _amount = IERC20(underlying).balanceOf(msg.sender); IERC20(underlying).safeTransferFrom(msg.sender, address(this), _amount); return _deposit(_amount, msg.sender); } function deposit(uint amount) external returns (uint) { IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); return _deposit(amount, msg.sender); } function deposit(uint amount, address to) external returns (uint) { IERC20(underlying).safeTransferFrom(msg.sender, address(this), amount); return _deposit(amount, to); } function depositVault(uint amount, address to) external onlyVault returns (uint) { return _deposit(amount, to); } function _deposit(uint amount, address to) internal returns (uint) { require(!underlyingIsMinted); require(underlying != address(0) &amp;&amp; underlying != address(this)); _mint(to, amount); return amount; } function withdraw() external returns (uint) { return _withdraw(msg.sender, balanceOf[msg.sender], msg.sender); } function withdraw(uint amount) external returns (uint) { return _withdraw(msg.sender, amount, msg.sender); } function withdraw(uint amount, address to) external returns (uint) { return _withdraw(msg.sender, amount, to); } function withdrawVault(address from, uint amount, address to) external onlyVault returns (uint) { return _withdraw(from, amount, to); } function _withdraw(address from, uint amount, address to) internal returns (uint) { require(!underlyingIsMinted); require(underlying != address(0) &amp;&amp; underlying != address(this)); _burn(from, amount); IERC20(underlying).safeTransfer(to, amount); return amount; } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; balanceOf[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); uint256 balance = balanceOf[account]; require(balance >= amount, "ERC20: burn amount exceeds balance"); balanceOf[account] = balance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /// @dev Sets `value` as allowance of `spender` account over caller account's AnyswapV6ERC20 token. /// Emits {Approval} event. /// Returns boolean value indicating whether operation succeeded. function approve(address spender, uint256 value) external override returns (bool) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /// @dev Moves `value` AnyswapV6ERC20 token from caller's account to account (`to`). /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - caller account must have at least `value` AnyswapV6ERC20 token. function transfer(address to, uint256 value) external override returns (bool) { require(to != address(0) &amp;&amp; to != address(this)); uint256 balance = balanceOf[msg.sender]; require(balance >= value, "AnyswapV6ERC20: transfer amount exceeds balance"); balanceOf[msg.sender] = balance - value; balanceOf[to] += value; emit Transfer(msg.sender, to, value); return true; } /// @dev Moves `value` AnyswapV6ERC20 token from account (`from`) to account (`to`) using allowance mechanism. /// `value` is then deducted from caller account's allowance, unless set to `type(uint256).max`. /// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`), /// unless allowance is set to `type(uint256).max` /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - `from` account must have at least `value` balance of AnyswapV6ERC20 token. /// - `from` account must have approved caller to spend at least `value` of AnyswapV6ERC20 token, unless `from` and caller are the same account. function transferFrom(address from, address to, uint256 value) external override returns (bool) { require(to != address(0) &amp;&amp; to != address(this)); if (from != msg.sender) { uint256 allowed = allowance[from][msg.sender]; if (allowed != type(uint256).max) { require(allowed >= value, "AnyswapV6ERC20: request exceeds allowance"); uint256 reduced = allowed - value; allowance[from][msg.sender] = reduced; emit Approval(from, msg.sender, reduced); } } uint256 balance = balanceOf[from]; require(balance >= value, "AnyswapV6ERC20: transfer amount exceeds balance"); balanceOf[from] = balance - value; balanceOf[to] += value; emit Transfer(from, to, value); return true; } }
AnyswapV6ERC20 ABI
Copied
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldVault","type":"address"},{"indexed":true,"internalType":"address","name":"newVault","type":"address"},{"indexed":true,"internalType":"uint256","name":"effectiveTime","type":"uint256"}],"name":"LogChangeVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txhash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"bindaddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"txhash","type":"bytes32"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swapin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"bindaddr","type":"address"}],"name":"Swapout","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newVault","type":"address"}],"name":"changeVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayMinter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"depositVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllMinters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"initVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mpc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setVaultOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingIsMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
AnyswapV6ERC20 Bytecode
Copied
60c06040523480156200001157600080fd5b506040516200448c3803806200448c833981810160405281019062000037919062000359565b84600090805190602001906200004f929190620001fd565b50836001908051906020019062000068929190620001fd565b508260ff1660808160ff1660f81b815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b81525050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146200017b578173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200012d57600080fd5b505afa15801562000142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016891906200041f565b60ff168360ff16146200017a57600080fd5b5b6001600460006101000a81548160ff0219169083151502179055506000600460016101000a81548160ff02191690831515021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050506200064a565b8280546200020b9062000527565b90600052602060002090601f0160209004810192826200022f57600085556200027b565b82601f106200024a57805160ff19168380011785556200027b565b828001600101855582156200027b579182015b828111156200027a5782518255916020019190600101906200025d565b5b5090506200028a91906200028e565b5090565b5b80821115620002a95760008160009055506001016200028f565b5090565b6000620002c4620002be846200047a565b62000451565b905082815260208101848484011115620002e357620002e2620005f6565b5b620002f0848285620004f1565b509392505050565b600081519050620003098162000616565b92915050565b600082601f830112620003275762000326620005f1565b5b815162000339848260208601620002ad565b91505092915050565b600081519050620003538162000630565b92915050565b600080600080600060a0868803121562000378576200037762000600565b5b600086015167ffffffffffffffff811115620003995762000398620005fb565b5b620003a7888289016200030f565b955050602086015167ffffffffffffffff811115620003cb57620003ca620005fb565b5b620003d9888289016200030f565b9450506040620003ec8882890162000342565b9350506060620003ff88828901620002f8565b92505060806200041288828901620002f8565b9150509295509295909350565b60006020828403121562000438576200043762000600565b5b6000620004488482850162000342565b91505092915050565b60006200045d62000470565b90506200046b82826200055d565b919050565b6000604051905090565b600067ffffffffffffffff821115620004985762000497620005c2565b5b620004a38262000605565b9050602081019050919050565b6000620004bd82620004c4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060ff82169050919050565b60005b8381101562000511578082015181840152602081019050620004f4565b8381111562000521576000848401525b50505050565b600060028204905060018216806200054057607f821691505b6020821081141562000557576200055662000593565b5b50919050565b620005688262000605565b810181811067ffffffffffffffff821117156200058a5762000589620005c2565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6200062181620004b0565b81146200062d57600080fd5b50565b6200063b81620004e4565b81146200064757600080fd5b50565b60805160f81c60a05160601c613db4620006d860003960008181611714015281816117a2015281816119d001528181611a2901528181611eef0152818161218c0152818161223d0152818161250d0152818161254e0152818161260401528181612882015281816128d90152818161292b01528181612d3c0152612d93015260006112ea0152613db46000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806387689e2811610146578063c3081240116100c3578063d93f244511610087578063d93f24451461079d578063dd62ed3e146107a7578063ec126c77146107d7578063f75c266414610807578063fbfa77cf14610825578063fca3b5aa146108435761025c565b8063c30812401461070b578063c4b740f514610729578063cfbd488514610745578063d0e30db014610761578063d6c797511461077f5761025c565b8063a045442c1161010a578063a045442c1461062d578063a9059cbb1461064b578063aa271e1a1461067b578063b6b55f25146106ab578063bebbf4d0146106db5761025c565b806387689e28146105855780638da5cb5b146105a357806391c5df49146105c157806395d89b41146105df5780639dc29fac146105fd5761025c565b80633ccfd60b116101df5780636817031b116101a35780636817031b1461049d57806369b41170146104b95780636e553f65146104d75780636f307dc31461050757806370a08231146105255780638623ec7b146105555761025c565b80633ccfd60b146103d157806340c10f19146103ef57806352113ba71461041f57806360e232a91461043d578063628d6cba1461046d5761025c565b806318160ddd1161022657806318160ddd1461031957806323b872dd146103375780632e1a7d4d146103675780632ebe3fbb14610397578063313ce567146103b35761025c565b806239d6ec14610261578062f714ce1461029157806306fdde03146102c1578063095ea7b3146102df5780630d707df81461030f575b600080fd5b61027b600480360381019061027691906131a7565b61085f565b604051610288919061383e565b60405180910390f35b6102ab60048036038101906102a69190613301565b610905565b6040516102b8919061383e565b60405180910390f35b6102c961091a565b6040516102d691906136bc565b60405180910390f35b6102f960048036038101906102f49190613167565b6109a8565b60405161030691906136a1565b60405180910390f35b610317610a9a565b005b610321610cdf565b60405161032e919061383e565b60405180910390f35b610351600480360381019061034c9190613114565b610ce9565b60405161035e91906136a1565b60405180910390f35b610381600480360381019061037c91906132a7565b611111565b60405161038e919061383e565b60405180910390f35b6103b160048036038101906103ac91906130a7565b611125565b005b6103bb6112e8565b6040516103c89190613859565b60405180910390f35b6103d961130c565b6040516103e6919061383e565b60405180910390f35b61040960048036038101906104049190613167565b61135d565b60405161041691906136a1565b60405180910390f35b6104276113ff565b6040516104349190613604565b60405180910390f35b610457600480360381019061045291906130a7565b611425565b60405161046491906136a1565b60405180910390f35b61048760048036038101906104829190613301565b611638565b60405161049491906136a1565b60405180910390f35b6104b760048036038101906104b291906130a7565b611866565b005b6104c16119bf565b6040516104ce919061383e565b60405180910390f35b6104f160048036038101906104ec9190613301565b6119c6565b6040516104fe919061383e565b60405180910390f35b61050f611a27565b60405161051c9190613604565b60405180910390f35b61053f600480360381019061053a91906130a7565b611a4b565b60405161054c919061383e565b60405180910390f35b61056f600480360381019061056a91906132a7565b611a63565b60405161057c9190613604565b60405180910390f35b61058d611aa2565b60405161059a919061383e565b60405180910390f35b6105ab611aa8565b6040516105b89190613604565b60405180910390f35b6105c9611ad2565b6040516105d69190613604565b60405180910390f35b6105e7611af8565b6040516105f491906136bc565b60405180910390f35b61061760048036038101906106129190613167565b611b86565b60405161062491906136a1565b60405180910390f35b610635611c28565b604051610642919061367f565b60405180910390f35b61066560048036038101906106609190613167565b611cb6565b60405161067291906136a1565b60405180910390f35b610695600480360381019061069091906130a7565b611ec5565b6040516106a291906136a1565b60405180910390f35b6106c560048036038101906106c091906132a7565b611ee5565b6040516106d2919061383e565b60405180910390f35b6106f560048036038101906106f09190613301565b611f45565b604051610702919061383e565b60405180910390f35b610713611fe9565b604051610720919061383e565b60405180910390f35b610743600480360381019061073e91906131fa565b611fef565b005b61075f600480360381019061075a91906130a7565b61209c565b005b610769612187565b604051610776919061383e565b60405180910390f35b610787612292565b60405161079491906136a1565b60405180910390f35b6107a5612297565b005b6107c160048036038101906107bc91906130d4565b612440565b6040516107ce919061383e565b60405180910390f35b6107f160048036038101906107ec9190613254565b612465565b6040516107fe91906136a1565b60405180910390f35b61080f6126b2565b60405161081c9190613604565b60405180910390f35b61082d6126dc565b60405161083a9190613604565b60405180910390f35b61085d600480360381019061085891906130a7565b612702565b005b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e8906136fe565b60405180910390fd5b6108fc84848461285b565b90509392505050565b600061091233848461285b565b905092915050565b60008054610927906139fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610953906139fb565b80156109a05780601f10610975576101008083540402835291602001916109a0565b820191906000526020600020905b81548152906001019060200180831161098357829003601f168201915b505050505081565b600081600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a88919061383e565b60405180910390a36001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b21906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610b8b57506009544210155b610b9457600080fd5b600160056000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506006600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600981905550565b6000600354905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610d5357503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b610d5c57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610f74576000600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610f725782811015610e7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e719061381e565b60405180910390fd5b60008382610e889190613935565b905080600c60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f68919061383e565b60405180910390a3505b505b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610ffb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff29061377e565b60405180910390fd5b82816110079190613935565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109991906138df565b925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516110fd919061383e565b60405180910390a360019150509392505050565b600061111e33833361285b565b9050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ac906136fe565b60405180910390fd5b600460009054906101000a900460ff166111ce57600080fd5b6000600460006101000a81548160ff02191690831515021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506006819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061135833600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020543361285b565b905090565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166113eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e2906136fe565b60405180910390fd5b6113f58383612979565b6001905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ae906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151e9061375e565b60405180910390fd5b428273ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f5c364079e7102c27c608f9b237c735a1b7bfa0b67f27c2ad26bad447bf965cac60405160405180910390a481600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600b8190555060019050919050565b6000600460019054906101000a900460ff161561168a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116819061373e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f19061375e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614158015611795575082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054105b156117ec576117e73330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ac2909392919063ffffffff16565b6117f7565b6117f63384612b4b565b5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6b616089d04950dc06c45c6dd787d657980543f89651aec47924752c7d16c88885604051611854919061383e565b60405180910390a36001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ed906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611966576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195d9061375e565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506202a300426119b691906138df565b600b8190555050565b6202a30081565b6000611a153330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ac2909392919063ffffffff16565b611a1f8383612d15565b905092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60026020528060005260406000206000915090505481565b60068181548110611a7357600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054611b05906139fb565b80601f0160208091040260200160405190810160405280929190818152602001828054611b31906139fb565b8015611b7e5780601f10611b5357610100808354040283529160200191611b7e565b820191906000526020600020905b815481529060010190602001808311611b6157829003601f168201915b505050505081565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0b906136fe565b60405180910390fd5b611c1e8383612b4b565b6001905092915050565b60606006805480602002602001604051908101604052809291908181526020018280548015611cac57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611c62575b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d2057503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b611d2957600080fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611db0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da79061377e565b60405180910390fd5b8281611dbc9190613935565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e4e91906138df565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611eb2919061383e565b60405180910390a3600191505092915050565b60056020528060005260406000206000915054906101000a900460ff1681565b6000611f343330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ac2909392919063ffffffff16565b611f3e8233612d15565b9050919050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fce906136fe565b60405180910390fd5b611fe18383612d15565b905092915050565b60095481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461207f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612076906136fe565b60405180910390fd5b80600460016101000a81548160ff02191690831515021790555050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461212c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612123906136fe565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016121e39190613604565b60206040518083038186803b1580156121fb57600080fd5b505afa15801561220f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223391906132d4565b90506122823330837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ac2909392919063ffffffff16565b61228c8133612d15565b91505090565b600081565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612327576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231e906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580156123885750600b544210155b61239157600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600b81905550565b600c602052816000526040600020602052806000526040600020600091509150505481565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166124f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ea906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16141580156125f85750817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016125a59190613604565b60206040518083038186803b1580156125bd57600080fd5b505afa1580156125d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f591906132d4565b10155b1561264d5761264883837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612de79092919063ffffffff16565b612658565b6126578383612979565b5b8273ffffffffffffffffffffffffffffffffffffffff16847f05d0634fe981be85c22e2942a880821b70095d84e152c3ea3c17a4e4250d9d618460405161269f919061383e565b60405180910390a3600190509392505050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612792576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612789906136fe565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f99061375e565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506202a3004261285291906138df565b60098190555050565b6000801561286857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161415801561291157503073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614155b61291a57600080fd5b6129248484612b4b565b61296f82847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612de79092919063ffffffff16565b8290509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e0906137fe565b60405180910390fd5b80600360008282546129fb91906138df565b9250508190555080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612a5191906138df565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612ab6919061383e565b60405180910390a35050565b612b45846323b872dd60e01b858585604051602401612ae39392919061361f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612e6d565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612bbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bb29061379e565b60405180910390fd5b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612c42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c39906136de565b60405180910390fd5b8181612c4e9190613935565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160036000828254612ca39190613935565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612d08919061383e565b60405180910390a3505050565b60008015612d2257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614158015612dcb57503073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614155b612dd457600080fd5b612dde8284612979565b82905092915050565b612e688363a9059cbb60e01b8484604051602401612e06929190613656565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612e6d565b505050565b612e8c8273ffffffffffffffffffffffffffffffffffffffff16612fde565b612ecb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ec2906137de565b60405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051612ef391906135ed565b6000604051808303816000865af19150503d8060008114612f30576040519150601f19603f3d011682016040523d82523d6000602084013e612f35565b606091505b509150915081612f7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f719061371e565b60405180910390fd5b600081511115612fd85780806020019051810190612f989190613227565b612fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fce906137be565b60405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b82141580156130205750808214155b92505050919050565b60008135905061303881613d22565b92915050565b60008135905061304d81613d39565b92915050565b60008151905061306281613d39565b92915050565b60008135905061307781613d50565b92915050565b60008135905061308c81613d67565b92915050565b6000815190506130a181613d67565b92915050565b6000602082840312156130bd576130bc613a8b565b5b60006130cb84828501613029565b91505092915050565b600080604083850312156130eb576130ea613a8b565b5b60006130f985828601613029565b925050602061310a85828601613029565b9150509250929050565b60008060006060848603121561312d5761312c613a8b565b5b600061313b86828701613029565b935050602061314c86828701613029565b925050604061315d8682870161307d565b9150509250925092565b6000806040838503121561317e5761317d613a8b565b5b600061318c85828601613029565b925050602061319d8582860161307d565b9150509250929050565b6000806000606084860312156131c0576131bf613a8b565b5b60006131ce86828701613029565b93505060206131df8682870161307d565b92505060406131f086828701613029565b9150509250925092565b6000602082840312156132105761320f613a8b565b5b600061321e8482850161303e565b91505092915050565b60006020828403121561323d5761323c613a8b565b5b600061324b84828501613053565b91505092915050565b60008060006060848603121561326d5761326c613a8b565b5b600061327b86828701613068565b935050602061328c86828701613029565b925050604061329d8682870161307d565b9150509250925092565b6000602082840312156132bd576132bc613a8b565b5b60006132cb8482850161307d565b91505092915050565b6000602082840312156132ea576132e9613a8b565b5b60006132f884828501613092565b91505092915050565b6000806040838503121561331857613317613a8b565b5b60006133268582860161307d565b925050602061333785828601613029565b9150509250929050565b600061334d8383613359565b60208301905092915050565b61336281613969565b82525050565b61337181613969565b82525050565b600061338282613884565b61338c81856138b2565b935061339783613874565b8060005b838110156133c85781516133af8882613341565b97506133ba836138a5565b92505060018101905061339b565b5085935050505092915050565b6133de8161397b565b82525050565b60006133ef8261388f565b6133f981856138c3565b93506134098185602086016139c8565b80840191505092915050565b60006134208261389a565b61342a81856138ce565b935061343a8185602086016139c8565b61344381613a90565b840191505092915050565b600061345b6022836138ce565b915061346682613aa1565b604082019050919050565b600061347e6019836138ce565b915061348982613af0565b602082019050919050565b60006134a16020836138ce565b91506134ac82613b19565b602082019050919050565b60006134c46019836138ce565b91506134cf82613b42565b602082019050919050565b60006134e7601a836138ce565b91506134f282613b6b565b602082019050919050565b600061350a602f836138ce565b915061351582613b94565b604082019050919050565b600061352d6021836138ce565b915061353882613be3565b604082019050919050565b6000613550602a836138ce565b915061355b82613c32565b604082019050919050565b6000613573601f836138ce565b915061357e82613c81565b602082019050919050565b6000613596601f836138ce565b91506135a182613caa565b602082019050919050565b60006135b96029836138ce565b91506135c482613cd3565b604082019050919050565b6135d8816139b1565b82525050565b6135e7816139bb565b82525050565b60006135f982846133e4565b915081905092915050565b60006020820190506136196000830184613368565b92915050565b60006060820190506136346000830186613368565b6136416020830185613368565b61364e60408301846135cf565b949350505050565b600060408201905061366b6000830185613368565b61367860208301846135cf565b9392505050565b600060208201905081810360008301526136998184613377565b905092915050565b60006020820190506136b660008301846133d5565b92915050565b600060208201905081810360008301526136d68184613415565b905092915050565b600060208201905081810360008301526136f78161344e565b9050919050565b6000602082019050818103600083015261371781613471565b9050919050565b6000602082019050818103600083015261373781613494565b9050919050565b60006020820190508181036000830152613757816134b7565b9050919050565b60006020820190508181036000830152613777816134da565b9050919050565b60006020820190508181036000830152613797816134fd565b9050919050565b600060208201905081810360008301526137b781613520565b9050919050565b600060208201905081810360008301526137d781613543565b9050919050565b600060208201905081810360008301526137f781613566565b9050919050565b6000602082019050818103600083015261381781613589565b9050919050565b60006020820190508181036000830152613837816135ac565b9050919050565b600060208201905061385360008301846135cf565b92915050565b600060208201905061386e60008301846135de565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006138ea826139b1565b91506138f5836139b1565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561392a57613929613a2d565b5b828201905092915050565b6000613940826139b1565b915061394b836139b1565b92508282101561395e5761395d613a2d565b5b828203905092915050565b600061397482613991565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156139e65780820151818401526020810190506139cb565b838111156139f5576000848401525b50505050565b60006002820490506001821680613a1357607f821691505b60208210811415613a2757613a26613a5c565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f416e7973776170563645524332303a20464f5242494444454e00000000000000600082015250565b7f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564600082015250565b7f416e7973776170563645524332303a207661756c744f6e6c7900000000000000600082015250565b7f416e7973776170563645524332303a2061646472657373283029000000000000600082015250565b7f416e7973776170563645524332303a207472616e7366657220616d6f756e742060008201527f657863656564732062616c616e63650000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400600082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b7f416e7973776170563645524332303a207265717565737420657863656564732060008201527f616c6c6f77616e63650000000000000000000000000000000000000000000000602082015250565b613d2b81613969565b8114613d3657600080fd5b50565b613d428161397b565b8114613d4d57600080fd5b50565b613d5981613987565b8114613d6457600080fd5b50565b613d70816139b1565b8114613d7b57600080fd5b5056fea264697066735822122022e3be33798e026815421e3b47bbe3b62360921ef4e372096b294f7d17c24ec064736f6c6343000806003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe3d319aad1be56e7b82e897cd129c4c2c8388dc000000000000000000000000000000000000000000000000000000000000000f446f6765636861696e20546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024443000000000000000000000000000000000000000000000000000000000000
Smart Contracts contract page background

Checkout more smart contracts

    Ethereum  logo

    LidoExecutionLayerRewardsVault

    Verified

    The following smart contract is called LidoExecutionLayerRewardsVault. It is used to manage rewards for the Lido protocol. The contract allows Lido to withdraw rewards, recover ERC20 and ERC721 tokens, and receive ETH. The contract uses the SafeERC20 library to ensure safe transfers of ERC20 tokens. The purpose of this contract is to provide a secure and efficient way to manage rewards for the Lido protocol.

    0x388c818ca8b9251b393131c08a736a67ccb19297
    Copied
    • Lido
    • Proposer Fee Recipient
    • Router
    Ethereum  logo

    Registry

    Verified

    The following smart contract is a Registry contract that manages routes for cross-chain transfers. It allows adding, disabling, and executing routes for middleware and bridge contracts. It also includes a function for rescuing funds and uses OpenZeppelin libraries for access control and ERC20 token handling.

    0xc30141b657f4216252dc59af2e7cdb9d8792e1b0
    Copied
    • Verified, Router
    • Router
    Ethereum  logo

    GasRefunder

    Verified

    The following smart contract is a GasRefunder contract that refunds gas costs to specified refundees. It allows the owner to set common parameters such as maximum refundee balance, extra gas margin, calldata cost, maximum gas tip, maximum gas cost, and maximum single gas usage. The contract also allows the owner to set allowed contracts and refundees, and withdraw funds.

    0xe64a54e2533fd126c2e452c5fab544d80e2e4eb5
    Copied
    • Verified, Router
    • Router
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key