Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 760 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Tokens | 19836651 | 190 days ago | IN | 0 ETH | 0.00010033 | ||||
Claim Tokens | 19836649 | 190 days ago | IN | 0 ETH | 0.00022305 | ||||
Complete Withdra... | 18831608 | 331 days ago | IN | 0 ETH | 0.00372321 | ||||
Claim Tokens | 18627155 | 360 days ago | IN | 0 ETH | 0.00161224 | ||||
Claim Tokens | 18590341 | 365 days ago | IN | 0 ETH | 0.00116126 | ||||
Claim Tokens | 18590328 | 365 days ago | IN | 0 ETH | 0.00118552 | ||||
Claim Tokens | 18590319 | 365 days ago | IN | 0 ETH | 0.00119564 | ||||
Claim Tokens | 18479248 | 381 days ago | IN | 0 ETH | 0.00285825 | ||||
Claim Tokens | 18447187 | 385 days ago | IN | 0 ETH | 0.00060538 | ||||
Claim Tokens | 18433322 | 387 days ago | IN | 0 ETH | 0.0010118 | ||||
Claim Tokens | 18411180 | 390 days ago | IN | 0 ETH | 0.0003744 | ||||
Claim Tokens | 17856023 | 468 days ago | IN | 0 ETH | 0.00077427 | ||||
Claim Tokens | 17855055 | 468 days ago | IN | 0 ETH | 0.00087599 | ||||
Claim Tokens | 17840609 | 470 days ago | IN | 0 ETH | 0.00123915 | ||||
Claim Tokens | 17796583 | 476 days ago | IN | 0 ETH | 0.00093038 | ||||
Claim Tokens | 17657108 | 496 days ago | IN | 0 ETH | 0.00190012 | ||||
Claim Tokens | 17581986 | 506 days ago | IN | 0 ETH | 0.0013315 | ||||
Claim Tokens | 17547004 | 511 days ago | IN | 0 ETH | 0.00084263 | ||||
Claim Tokens | 17318582 | 543 days ago | IN | 0 ETH | 0.00196705 | ||||
Complete Withdra... | 17115359 | 572 days ago | IN | 0 ETH | 0.00210694 | ||||
Claim Tokens | 16933947 | 598 days ago | IN | 0 ETH | 0.00238712 | ||||
Claim Tokens | 16902870 | 602 days ago | IN | 0 ETH | 0.00087123 | ||||
Claim Tokens | 16902842 | 602 days ago | IN | 0 ETH | 0.00084459 | ||||
Claim Tokens | 16737662 | 625 days ago | IN | 0 ETH | 0.00165314 | ||||
Claim Tokens | 16605477 | 644 days ago | IN | 0 ETH | 0.0009107 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
19836649 | 190 days ago | 0 ETH | |||||
18831608 | 331 days ago | 0 ETH | |||||
18627155 | 360 days ago | 0 ETH | |||||
18590341 | 365 days ago | 0 ETH | |||||
18590328 | 365 days ago | 0 ETH | |||||
18590319 | 365 days ago | 0 ETH | |||||
18479248 | 381 days ago | 0 ETH | |||||
18447187 | 385 days ago | 0 ETH | |||||
18433322 | 387 days ago | 0 ETH | |||||
18411180 | 390 days ago | 0 ETH | |||||
17856023 | 468 days ago | 0 ETH | |||||
17855055 | 468 days ago | 0 ETH | |||||
17840609 | 470 days ago | 0 ETH | |||||
17796583 | 476 days ago | 0 ETH | |||||
17657108 | 496 days ago | 0 ETH | |||||
17581986 | 506 days ago | 0 ETH | |||||
17547004 | 511 days ago | 0 ETH | |||||
17318582 | 543 days ago | 0 ETH | |||||
17115359 | 572 days ago | 0 ETH | |||||
16933947 | 598 days ago | 0 ETH | |||||
16902870 | 602 days ago | 0 ETH | |||||
16902842 | 602 days ago | 0 ETH | |||||
16737662 | 625 days ago | 0 ETH | |||||
16605477 | 644 days ago | 0 ETH | |||||
16605423 | 644 days ago | 0 ETH |
Loading...
Loading
Contract Name:
Batcher
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IBatcher.sol"; import "../../interfaces/IVault.sol"; import "./EIP712.sol"; /// @title Batcher /// @author 0xAd1 /// @notice Used to batch user deposits and withdrawals until the next rebalance contract Batcher is IBatcher, EIP712, ReentrancyGuard { using SafeERC20 for IERC20; /// @notice Vault parameters for the batcher VaultInfo public vaultInfo; /// @notice Enforces signature checking on deposits bool public checkValidDepositSignature; /// @notice Creates a new Batcher strictly linked to a vault /// @param _verificationAuthority Address of the verification authority which allows users to deposit /// @param vaultAddress Address of the vault which will be used to deposit and withdraw want tokens /// @param maxAmount Maximum amount of tokens that can be deposited in the vault constructor( address _verificationAuthority, address vaultAddress, uint256 maxAmount ) { verificationAuthority = _verificationAuthority; checkValidDepositSignature = true; require(vaultAddress != address(0), "NULL_ADDRESS"); vaultInfo = VaultInfo({ vaultAddress: vaultAddress, tokenAddress: IVault(vaultAddress).wantToken(), maxAmount: maxAmount }); IERC20(vaultInfo.tokenAddress).approve(vaultAddress, type(uint256).max); } /*/////////////////////////////////////////////////////////////// USER DEPOSIT/WITHDRAWAL LOGIC //////////////////////////////////////////////////////////////*/ /// @notice Ledger to maintain addresses and their amounts to be deposited into vault mapping(address => uint256) public depositLedger; /// @notice Ledger to maintain addresses and their amounts to be withdrawn from vault mapping(address => uint256) public withdrawLedger; /// @notice Address which authorises users to deposit into Batcher address public verificationAuthority; /// @notice Amount of want tokens pending to be deposited uint256 public pendingDeposit; /// @notice Amount of LP tokens pending to be exchanged back to want token uint256 public pendingWithdrawal; /** * @notice Stores the deposits for future batching via periphery * @param amountIn Value of token to be deposited * @param signature signature verifying that depositor has enough karma and is authorized to deposit by brahma */ function depositFunds( uint256 amountIn, bytes memory signature, address recipient ) external override nonReentrant { validDeposit(recipient, signature); IERC20(vaultInfo.tokenAddress).safeTransferFrom( msg.sender, address(this), amountIn ); require( IERC20(vaultInfo.vaultAddress).totalSupply() + pendingDeposit - pendingWithdrawal + amountIn <= vaultInfo.maxAmount, "MAX_LIMIT_EXCEEDED" ); depositLedger[recipient] = depositLedger[recipient] + (amountIn); pendingDeposit = pendingDeposit + amountIn; emit DepositRequest(recipient, vaultInfo.vaultAddress, amountIn); } /** * @notice User deposits vault LP tokens to be withdrawn. Stores the deposits for future batching via periphery * @param amountIn Value of token to be deposited */ function initiateWithdrawal(uint256 amountIn) external override nonReentrant { require(depositLedger[msg.sender] == 0, "DEPOSIT_PENDING"); require(amountIn > 0, "AMOUNT_IN_ZERO"); if (amountIn > userLPTokens[msg.sender]) { IERC20(vaultInfo.vaultAddress).safeTransferFrom( msg.sender, address(this), amountIn - userLPTokens[msg.sender] ); userLPTokens[msg.sender] = 0; } else { userLPTokens[msg.sender] = userLPTokens[msg.sender] - amountIn; } withdrawLedger[msg.sender] = withdrawLedger[msg.sender] + (amountIn); pendingWithdrawal = pendingWithdrawal + amountIn; emit WithdrawRequest(msg.sender, vaultInfo.vaultAddress, amountIn); } /** * @notice Allows user to collect want token back after successfull batch withdrawal * @param amountOut Amount of token to be withdrawn */ function completeWithdrawal(uint256 amountOut, address recipient) external override nonReentrant { require(amountOut != 0, "INVALID_AMOUNTOUT"); // Will revert if not enough balance userWantTokens[recipient] = userWantTokens[recipient] - amountOut; IERC20(vaultInfo.tokenAddress).safeTransfer(recipient, amountOut); emit WithdrawComplete(recipient, vaultInfo.vaultAddress, amountOut); } /** * @notice Can be used to send LP tokens owed to the recipient * @param amount Amount of LP tokens to withdraw * @param recipient Address to receive the LP tokens */ function claimTokens(uint256 amount, address recipient) public override nonReentrant { require(userLPTokens[recipient] >= amount, "NO_FUNDS"); userLPTokens[recipient] = userLPTokens[recipient] - amount; IERC20(vaultInfo.vaultAddress).safeTransfer(recipient, amount); } /*/////////////////////////////////////////////////////////////// VAULT DEPOSIT/WITHDRAWAL LOGIC //////////////////////////////////////////////////////////////*/ /// @notice Ledger to maintain addresses and vault LP tokens which batcher owes them mapping(address => uint256) public userLPTokens; /// @notice Ledger to maintain addresses and vault want tokens which batcher owes them mapping(address => uint256) public userWantTokens; /** * @notice Performs deposits on the periphery for the supplied users in batch * @param users array of users whose deposits must be resolved */ function batchDeposit(address[] memory users) external override nonReentrant { onlyKeeper(); IVault vault = IVault(vaultInfo.vaultAddress); uint256 amountToDeposit = 0; uint256 oldLPBalance = IERC20(address(vault)).balanceOf(address(this)); // Temprorary array to hold user deposit info and check for duplicate addresses uint256[] memory depositValues = new uint256[](users.length); for (uint256 i = 0; i < users.length; i++) { // Copies deposit value from ledger to temporary array uint256 userDeposit = depositLedger[users[i]]; amountToDeposit = amountToDeposit + userDeposit; depositValues[i] = userDeposit; // deposit ledger for that address is set to zero // Incase of duplicate address sent, new deposit amount used for same user will be 0 depositLedger[users[i]] = 0; } require(amountToDeposit > 0, "NO_DEPOSITS"); uint256 lpTokensReportedByVault = vault.deposit( amountToDeposit, address(this) ); uint256 lpTokensReceived = IERC20(address(vault)).balanceOf( address(this) ) - (oldLPBalance); require( lpTokensReceived == lpTokensReportedByVault, "LP_TOKENS_MISMATCH" ); uint256 totalUsersProcessed = 0; for (uint256 i = 0; i < users.length; i++) { uint256 userAmount = depositValues[i]; // Checks if userAmount is not 0, only then proceed to allocate LP tokens if (userAmount > 0) { uint256 userShare = (userAmount * (lpTokensReceived)) / (amountToDeposit); // Allocating LP tokens to user, can be calimed by the user later by calling claimTokens userLPTokens[users[i]] = userLPTokens[users[i]] + userShare; ++totalUsersProcessed; } } pendingDeposit = pendingDeposit - amountToDeposit; emit BatchDepositSuccessful(lpTokensReceived, totalUsersProcessed); } /** * @notice Performs withdraws on the periphery for the supplied users in batch * @param users array of users whose deposits must be resolved */ function batchWithdraw(address[] memory users) external override nonReentrant { onlyKeeper(); IVault vault = IVault(vaultInfo.vaultAddress); IERC20 token = IERC20(vaultInfo.tokenAddress); uint256 amountToWithdraw = 0; uint256 oldWantBalance = token.balanceOf(address(this)); // Temprorary array to hold user withdrawal info and check for duplicate addresses uint256[] memory withdrawValues = new uint256[](users.length); for (uint256 i = 0; i < users.length; i++) { uint256 userWithdraw = withdrawLedger[users[i]]; amountToWithdraw = amountToWithdraw + userWithdraw; withdrawValues[i] = userWithdraw; // Withdrawal ledger for that address is set to zero // Incase of duplicate address sent, new withdrawal amount used for same user will be 0 withdrawLedger[users[i]] = 0; } require(amountToWithdraw > 0, "NO_WITHDRAWS"); uint256 wantTokensReportedByVault = vault.withdraw( amountToWithdraw, address(this) ); uint256 wantTokensReceived = token.balanceOf(address(this)) - (oldWantBalance); require( wantTokensReceived == wantTokensReportedByVault, "WANT_TOKENS_MISMATCH" ); uint256 totalUsersProcessed = 0; for (uint256 i = 0; i < users.length; i++) { uint256 userAmount = withdrawValues[i]; // Checks if userAmount is not 0, only then proceed to allocate want tokens if (userAmount > 0) { uint256 userShare = (userAmount * wantTokensReceived) / amountToWithdraw; // Allocating want tokens to user. Can be claimed by the user by calling completeWithdrawal userWantTokens[users[i]] = userWantTokens[users[i]] + userShare; ++totalUsersProcessed; } } pendingWithdrawal = pendingWithdrawal - amountToWithdraw; emit BatchWithdrawSuccessful(wantTokensReceived, totalUsersProcessed); } /*/////////////////////////////////////////////////////////////// INTERNAL HELPERS //////////////////////////////////////////////////////////////*/ /// @notice Helper to verify signature against verification authority /// @param signature Should be generated by verificationAuthority. Should contain msg.sender function validDeposit(address recipient, bytes memory signature) internal view { if (checkValidDepositSignature) { require( verifySignatureAgainstAuthority( recipient, signature, verificationAuthority ), "INVALID_SIGNATURE" ); } require(withdrawLedger[msg.sender] == 0, "WITHDRAW_PENDING"); } /*/////////////////////////////////////////////////////////////// MAINTAINANCE ACTIONS //////////////////////////////////////////////////////////////*/ /// @notice Function to set authority address /// @param authority New authority address function setAuthority(address authority) public { onlyGovernance(); // Logging old and new verification authority emit VerificationAuthorityUpdated(verificationAuthority, authority); verificationAuthority = authority; } /// @inheritdoc IBatcher function setVaultLimit(uint256 maxAmount) external override { onlyGovernance(); vaultInfo.maxAmount = maxAmount; } /// @notice Function to enable/disable deposit signature check function setDepositSignatureCheck(bool enabled) public { onlyGovernance(); checkValidDepositSignature = enabled; } /// @notice Function to sweep funds out in case of emergency, can only be called by governance /// @param _token Address of token to sweep function sweep(address _token) public nonReentrant { onlyGovernance(); IERC20(_token).transfer( msg.sender, IERC20(_token).balanceOf(address(this)) ); } /*/////////////////////////////////////////////////////////////// ACCESS MODIFERS //////////////////////////////////////////////////////////////*/ /// @notice Helper to get Governance address from Vault contract /// @return Governance address function governance() public view returns (address) { require(vaultInfo.vaultAddress != address(0), "NULL_ADDRESS"); return IVault(vaultInfo.vaultAddress).governance(); } /// @notice Helper to get Keeper address from Vault contract /// @return Keeper address function keeper() public view returns (address) { require(vaultInfo.vaultAddress != address(0), "NULL_ADDRESS"); return IVault(vaultInfo.vaultAddress).keeper(); } /// @notice Helper to assert msg.sender as keeper address function onlyKeeper() internal view { require(msg.sender == keeper(), "ONLY_KEEPER"); } /// @notice Helper to asset msg.sender as governance address function onlyGovernance() internal view { require(governance() == msg.sender, "ONLY_GOV"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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 ReentrancyGuard { // 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; constructor() { _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; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @title IBatcher * @notice A batcher to resolve vault deposits/withdrawals in batches * @dev Provides an interface for Batcher */ interface IBatcher { /// @notice Data structure to store vault info /// @param vaultAddress Address of the vault /// @param tokenAddress Address vault's want token /// @param maxAmount Max amount of tokens to deposit in vault /// @param currentAmount Current amount of wantTokens deposited in the vault struct VaultInfo { address vaultAddress; address tokenAddress; uint256 maxAmount; } /// @notice Deposit event /// @param sender Address of the depositor /// @param vault Address of the vault /// @param amountIn Tokens deposited event DepositRequest( address indexed sender, address indexed vault, uint256 amountIn ); /// @notice Withdraw initiate event /// @param sender Address of the withdawer /// @param vault Address of the vault /// @param amountOut Tokens deposited event WithdrawRequest( address indexed sender, address indexed vault, uint256 amountOut ); /// @notice Batch Deposit event /// @param amountIn Tokens deposited /// @param totalUsers Total number of users in the batch event BatchDepositSuccessful(uint256 amountIn, uint256 totalUsers); /// @notice Batch Withdraw event /// @param amountOut Tokens withdrawn /// @param totalUsers Total number of users in the batch event BatchWithdrawSuccessful(uint256 amountOut, uint256 totalUsers); /// @notice Withdraw complete event /// @param sender Address of the withdawer /// @param vault Address of the vault /// @param amountOut Tokens deposited event WithdrawComplete( address indexed sender, address indexed vault, uint256 amountOut ); /// @notice Verification authority update event /// @param oldVerificationAuthority address of old verification authority /// @param newVerificationAuthority address of new verification authority event VerificationAuthorityUpdated( address indexed oldVerificationAuthority, address indexed newVerificationAuthority ); function depositFunds(uint256 amountIn, bytes memory signature, address recipient) external; function claimTokens(uint256 amount, address recipient) external; function initiateWithdrawal(uint256 amountIn) external; function completeWithdrawal(uint256 amountOut, address recipient) external; function batchDeposit(address[] memory users) external; function batchWithdraw(address[] memory users) external; function setVaultLimit(uint256 maxLimit) external; }
/// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; interface IVault { function keeper() external view returns (address); function governance() external view returns (address); function wantToken() external view returns (address); function deposit(uint256 amountIn, address receiver) external returns (uint256 shares); function withdraw(uint256 sharesIn, address receiver) external returns (uint256 amountOut); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /// @title EIP712 /// @author 0xAd1 /// @notice Used to verify signatures contract EIP712 { /// @notice Verifies a signature against alleged signer of the signature /// @param signature Signature to verify /// @param authority Signer of the signature /// @return True if the signature is signed by authority function verifySignatureAgainstAuthority( address recipient, bytes memory signature, address authority ) internal view returns (bool) { bytes32 eip712DomainHash = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes("Batcher")), keccak256(bytes("1")), 1, address(this) ) ); bytes32 hashStruct = keccak256( abi.encode(keccak256("deposit(address owner)"), recipient) ); bytes32 hash = keccak256( abi.encodePacked("\x19\x01", eip712DomainHash, hashStruct) ); address signer = ECDSA.recover(hash, signature); require(signer == authority, "ECDSA: Invalid authority"); require(signer != address(0), "ECDSA: invalid signature"); return true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_verificationAuthority","type":"address"},{"internalType":"address","name":"vaultAddress","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalUsers","type":"uint256"}],"name":"BatchDepositSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalUsers","type":"uint256"}],"name":"BatchWithdrawSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"DepositRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldVerificationAuthority","type":"address"},{"indexed":true,"internalType":"address","name":"newVerificationAuthority","type":"address"}],"name":"VerificationAuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"WithdrawComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"WithdrawRequest","type":"event"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"batchDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"batchWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkValidDepositSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"completeWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"}],"name":"depositFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositLedger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"initiateWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setDepositSignatureCheck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"setVaultLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLPTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userWantTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultInfo","outputs":[{"internalType":"address","name":"vaultAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verificationAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawLedger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620027173803806200271783398101604081905262000034916200024b565b60016000819055600780546001600160a01b0319166001600160a01b03868116919091179091556004805460ff19169092179091558216620000ab5760405162461bcd60e51b815260206004820152600c60248201526b4e554c4c5f4144445245535360a01b604482015260640160405180910390fd5b6040518060600160405280836001600160a01b03168152602001836001600160a01b031663d23e04806040518163ffffffff1660e01b815260040160206040518083038186803b158015620000ff57600080fd5b505afa15801562000114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013a919062000227565b6001600160a01b03908116825260209182018490528251600180549183166001600160a01b03199283161790559183015160028054918316919093168117909255604092830151600355915163095ea7b360e01b8152918416600483015260001960248301529063095ea7b390604401602060405180830381600087803b158015620001c557600080fd5b505af1158015620001da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020091906200028b565b50505050620002ad565b80516001600160a01b03811681146200022257600080fd5b919050565b60006020828403121562000239578081fd5b62000244826200020a565b9392505050565b60008060006060848603121562000260578182fd5b6200026b846200020a565b92506200027b602085016200020a565b9150604084015190509250925092565b6000602082840312156200029d578081fd5b8151801515811462000244578182fd5b61245a80620002bd6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80636e164e23116100b8578063ba9a35871161007c578063ba9a3587146102aa578063da5f05af146102bd578063e6ac418a146102dd578063ec3b613d146102f0578063ec7a0d9814610303578063f64c6f321461031657600080fd5b80636e164e23146102535780637a9e5e4b146102665780637e28882214610279578063a5c82f1814610282578063aced1661146102a257600080fd5b8063501ec738116100ff578063501ec7381461019d578063527839b0146101d35780635aa6e675146102015780635b9d26581461021657806366b1a5de1461023657600080fd5b806301681a621461013c5780630a3d95d81461015157806312edde5e14610164578063431cc3dd14610177578063474a3b841461018a575b600080fd5b61014f61014a366004611f98565b61031f565b005b61014f61015f366004612084565b610465565b61014f6101723660046120bc565b610480565b61014f610185366004611fd0565b61064c565b61014f6101983660046120bc565b610b73565b6001546002546003546101bb926001600160a01b0390811692169083565b6040516101ca939291906121f2565b60405180910390f35b6101f36101e1366004611f98565b600a6020526000908152604090205481565b6040519081526020016101ca565b610209610b80565b6040516101ca91906121de565b6101f3610224366004611f98565b60066020526000908152604090205481565b6004546102439060ff1681565b60405190151581526020016101ca565b61014f6102613660046120ec565b610c2d565b61014f610274366004611f98565b610cf7565b6101f360095481565b6101f3610290366004611f98565b60056020526000908152604090205481565b610209610d5b565b61014f6102b836600461211b565b610dcb565b6101f36102cb366004611f98565b600b6020526000908152604090205481565b600754610209906001600160a01b031681565b61014f6102fe366004611fd0565b610f9a565b61014f6103113660046120ec565b6114b8565b6101f360085481565b6002600054141561034b5760405162461bcd60e51b8152600401610342906122b8565b60405180910390fd5b60026000556103586115bf565b6040516370a0823160e01b81526001600160a01b0382169063a9059cbb90339083906370a082319061038e9030906004016121de565b60206040518083038186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906120d4565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561042457600080fd5b505af1158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c91906120a0565b50506001600055565b61046d6115bf565b6004805460ff1916911515919091179055565b600260005414156104a35760405162461bcd60e51b8152600401610342906122b8565b6002600090815533815260056020526040902054156104f65760405162461bcd60e51b815260206004820152600f60248201526e4445504f5349545f50454e44494e4760881b6044820152606401610342565b600081116105375760405162461bcd60e51b815260206004820152600e60248201526d414d4f554e545f494e5f5a45524f60901b6044820152606401610342565b336000908152600a602052604090205481111561059857336000818152600a60205260409020546105839190309061056f9085612377565b6001546001600160a01b031692919061160b565b336000908152600a60205260408120556105c4565b336000908152600a60205260409020546105b3908290612377565b336000908152600a60205260409020555b336000908152600660205260409020546105df908290612320565b336000908152600660205260409020556009546105fd908290612320565b6009556001546040518281526001600160a01b039091169033907fcdb62e3f244f9959bd661d145243fc71558361230885919e11fcc84312d44c7d9060200160405180910390a3506001600055565b6002600054141561066f5760405162461bcd60e51b8152600401610342906122b8565b600260005561067c611669565b6001546002546040516370a0823160e01b81526001600160a01b039283169290911690600090819083906370a08231906106ba9030906004016121de565b60206040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a91906120d4565b90506000855167ffffffffffffffff81111561073657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561075f578160200160208202803683370190505b50905060005b86518110156108605760006006600089848151811061079457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905080856107cb9190612320565b9450808383815181106107ee57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506000600660008a858151811061082057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550508080610858906123ba565b915050610765565b50600083116108a05760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f57495448445241575360a01b6044820152606401610342565b604051627b8a6760e11b81526000906001600160a01b0387169062f714ce906108cf9087903090600401612216565b602060405180830381600087803b1580156108e957600080fd5b505af11580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092191906120d4565b9050600083866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161095291906121de565b60206040518083038186803b15801561096a57600080fd5b505afa15801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a291906120d4565b6109ac9190612377565b90508181146109f45760405162461bcd60e51b81526020600482015260146024820152730ae829ca8bea89e968a9ca6be9a92a69a82a886960631b6044820152606401610342565b6000805b8951811015610b18576000858281518110610a2357634e487b7160e01b600052603260045260246000fd5b602002602001015190506000811115610b0557600088610a438684612358565b610a4d9190612338565b905080600b60008e8681518110610a7457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054610aa79190612320565b600b60008e8681518110610acb57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555083610b01906123ba565b9350505b5080610b10816123ba565b9150506109f8565b5085600954610b279190612377565b60095560408051838152602081018390527f253f39873a287fb2801f5e791a591779d3ff3e219ec7c9793784a25ba658a759910160405180910390a15050600160005550505050505050565b610b7b6115bf565b600355565b6001546000906001600160a01b0316610bab5760405162461bcd60e51b815260040161034290612292565b60015460408051635aa6e67560e01b815290516001600160a01b0390921691635aa6e67591600480820192602092909190829003018186803b158015610bf057600080fd5b505afa158015610c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c289190611fb4565b905090565b60026000541415610c505760405162461bcd60e51b8152600401610342906122b8565b600260009081556001600160a01b0382168152600a6020526040902054821115610ca75760405162461bcd60e51b81526020600482015260086024820152674e4f5f46554e445360c01b6044820152606401610342565b6001600160a01b0381166000908152600a6020526040902054610ccb908390612377565b6001600160a01b038083166000908152600a602052604090209190915560015461045c911682846116bf565b610cff6115bf565b6007546040516001600160a01b038084169216907f0c1d6fac887f995d8165f884c34f3de9a2e4c9707aacccf2cf22812377c280af90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6001546000906001600160a01b0316610d865760405162461bcd60e51b815260040161034290612292565b6001546040805163aced166160e01b815290516001600160a01b039092169163aced166191600480820192602092909190829003018186803b158015610bf057600080fd5b60026000541415610dee5760405162461bcd60e51b8152600401610342906122b8565b6002600055610dfd81836116f4565b600254610e15906001600160a01b031633308661160b565b600354600954600854600154604080516318160ddd60e01b81529051889493926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610e6457600080fd5b505afa158015610e78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9c91906120d4565b610ea69190612320565b610eb09190612377565b610eba9190612320565b1115610efd5760405162461bcd60e51b815260206004820152601260248201527113505617d31253525517d15610d15151115160721b6044820152606401610342565b6001600160a01b038116600090815260056020526040902054610f21908490612320565b6001600160a01b038216600090815260056020526040902055600854610f48908490612320565b6008556001546040518481526001600160a01b03918216918316907f4ed1a8a57a37b79833de68b3bc01307fc91c77341a669fc487f7e588f986d5ff9060200160405180910390a35050600160005550565b60026000541415610fbd5760405162461bcd60e51b8152600401610342906122b8565b6002600055610fca611669565b6001546040516370a0823160e01b81526001600160a01b0390911690600090819083906370a08231906110019030906004016121de565b60206040518083038186803b15801561101957600080fd5b505afa15801561102d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105191906120d4565b90506000845167ffffffffffffffff81111561107d57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156110a6578160200160208202803683370190505b50905060005b85518110156111a7576000600560008884815181106110db57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905080856111129190612320565b94508083838151811061113557634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060006005600089858151811061116757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555050808061119f906123ba565b9150506110ac565b50600083116111e65760405162461bcd60e51b815260206004820152600b60248201526a4e4f5f4445504f5349545360a81b6044820152606401610342565b604051636e553f6560e01b81526000906001600160a01b03861690636e553f65906112179087903090600401612216565b602060405180830381600087803b15801561123157600080fd5b505af1158015611245573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126991906120d4565b9050600083866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161129a91906121de565b60206040518083038186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ea91906120d4565b6112f49190612377565b905081811461133a5760405162461bcd60e51b8152602060048201526012602482015271098a0bea89e968a9ca6be9a92a69a82a886960731b6044820152606401610342565b6000805b885181101561145e57600085828151811061136957634e487b7160e01b600052603260045260246000fd5b60200260200101519050600081111561144b576000886113898684612358565b6113939190612338565b905080600a60008d86815181106113ba57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020546113ed9190612320565b600a60008d868151811061141157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555083611447906123ba565b9350505b5080611456816123ba565b91505061133e565b508560085461146d9190612377565b60085560408051838152602081018390527f8211507759e56fdc649418f9277798429bc90613b9b4a54e7b08458538b5b6f0910160405180910390a150506001600055505050505050565b600260005414156114db5760405162461bcd60e51b8152600401610342906122b8565b6002600055816115215760405162461bcd60e51b81526020600482015260116024820152701253959053125117d05353d5539513d555607a1b6044820152606401610342565b6001600160a01b0381166000908152600b6020526040902054611545908390612377565b6001600160a01b038083166000908152600b6020526040902091909155600254611571911682846116bf565b6001546040518381526001600160a01b03918216918316907fce67cd4e23f137729b8b844fbf25399d5130346f0d62c18afdc0a943e1d1f1019060200160405180910390a350506001600055565b336115c8610b80565b6001600160a01b0316146116095760405162461bcd60e51b815260206004820152600860248201526727a7262cafa3a7ab60c11b6044820152606401610342565b565b611663846323b872dd60e01b85858560405160240161162c939291906121f2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117ac565b50505050565b611671610d5b565b6001600160a01b0316336001600160a01b0316146116095760405162461bcd60e51b815260206004820152600b60248201526a27a7262cafa5a2a2a822a960a91b6044820152606401610342565b6040516001600160a01b0383166024820152604481018290526116ef90849063a9059cbb60e01b9060640161162c565b505050565b60045460ff16156117585760075461171890839083906001600160a01b031661187e565b6117585760405162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b6044820152606401610342565b33600090815260066020526040902054156117a85760405162461bcd60e51b815260206004820152601060248201526f57495448445241575f50454e44494e4760801b6044820152606401610342565b5050565b6000611801826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a839092919063ffffffff16565b8051909150156116ef578080602001905181019061181f91906120a0565b6116ef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610342565b60408051808201825260078152662130ba31b432b960c91b602091820152815180830183526001808252603160f81b9183019190915282517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818401527fe9d76cee0cf4473cddcc3e081ef9f2caab96302d23d7ba675ea190f2188e546f818501527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101919091523060a0808301919091528351808303909101815260c08201909352825192909101919091206000918290611988907f2fe9f7b6a29d4dd4b42345a1abcb25508fd8a183b707ff2d4a5130e9ccb1926190889060e001612216565b604051602081830303815290604052805190602001209050600082826040516020016119cb92919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905060006119ef8288611a9a565b9050856001600160a01b0316816001600160a01b031614611a4d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20496e76616c696420617574686f7269747960401b6044820152606401610342565b6001600160a01b038116611a735760405162461bcd60e51b815260040161034290612260565b60019450505050505b9392505050565b6060611a928484600085611abe565b949350505050565b6000806000611aa98585611bef565b91509150611ab681611c5f565b509392505050565b606082471015611b1f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610342565b6001600160a01b0385163b611b765760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b600080866001600160a01b03168587604051611b9291906121c2565b60006040518083038185875af1925050503d8060008114611bcf576040519150601f19603f3d011682016040523d82523d6000602084013e611bd4565b606091505b5091509150611be4828286611e33565b979650505050505050565b600080825160411415611c265760208301516040840151606085015160001a611c1a87828585611e6c565b94509450505050611c58565b825160401415611c505760208301516040840151611c45868383611f4f565b935093505050611c58565b506000905060025b9250929050565b6000816004811115611c8157634e487b7160e01b600052602160045260246000fd5b1415611c8a5750565b6001816004811115611cac57634e487b7160e01b600052602160045260246000fd5b1415611cca5760405162461bcd60e51b815260040161034290612260565b6002816004811115611cec57634e487b7160e01b600052602160045260246000fd5b1415611d3a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610342565b6003816004811115611d5c57634e487b7160e01b600052602160045260246000fd5b1415611db55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610342565b6004816004811115611dd757634e487b7160e01b600052602160045260246000fd5b1415611e305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610342565b50565b60608315611e42575081611a7c565b825115611e525782518084602001fd5b8160405162461bcd60e51b8152600401610342919061222d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115611e995750600090506003611f46565b8460ff16601b14158015611eb157508460ff16601c14155b15611ec25750600090506004611f46565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611f16573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611f3f57600060019250925050611f46565b9150600090505b94509492505050565b6000806001600160ff1b03831681611f6c60ff86901c601b612320565b9050611f7a87828885611e6c565b935093505050935093915050565b8035611f9381612401565b919050565b600060208284031215611fa9578081fd5b8135611a7c81612401565b600060208284031215611fc5578081fd5b8151611a7c81612401565b60006020808385031215611fe2578182fd5b823567ffffffffffffffff80821115611ff9578384fd5b818501915085601f83011261200c578384fd5b81358181111561201e5761201e6123eb565b8060051b915061202f8483016122ef565b8181528481019084860184860187018a1015612049578788fd5b8795505b83861015612077578035945061206285612401565b8483526001959095019491860191860161204d565b5098975050505050505050565b600060208284031215612095578081fd5b8135611a7c81612416565b6000602082840312156120b1578081fd5b8151611a7c81612416565b6000602082840312156120cd578081fd5b5035919050565b6000602082840312156120e5578081fd5b5051919050565b600080604083850312156120fe578081fd5b82359150602083013561211081612401565b809150509250929050565b60008060006060848603121561212f578081fd5b8335925060208085013567ffffffffffffffff8082111561214e578384fd5b818701915087601f830112612161578384fd5b813581811115612173576121736123eb565b612185601f8201601f191685016122ef565b9150808252888482850101111561219a578485fd5b808484018584013781019092018390525091506121b960408501611f88565b90509250925092565b600082516121d481846020870161238e565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b9182526001600160a01b0316602082015260400190565b602081526000825180602084015261224c81604085016020870161238e565b601f01601f19169190910160400192915050565b60208082526018908201527745434453413a20696e76616c6964207369676e617475726560401b604082015260600190565b6020808252600c908201526b4e554c4c5f4144445245535360a01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612318576123186123eb565b604052919050565b60008219821115612333576123336123d5565b500190565b60008261235357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612372576123726123d5565b500290565b600082821015612389576123896123d5565b500390565b60005b838110156123a9578181015183820152602001612391565b838111156116635750506000910152565b60006000198214156123ce576123ce6123d5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611e3057600080fd5b8015158114611e3057600080fdfea2646970667358221220e2239f5ccc26b795995c75f277acb7e112c687ba2711beb02d17b54f953c5c8564736f6c63430008040033000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e0000000000000000000000001c4ceb52ab54a35f9d03fcc156a7c57f965e081e000000000000000000000000000000000000000000000000000000e9feab0200
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80636e164e23116100b8578063ba9a35871161007c578063ba9a3587146102aa578063da5f05af146102bd578063e6ac418a146102dd578063ec3b613d146102f0578063ec7a0d9814610303578063f64c6f321461031657600080fd5b80636e164e23146102535780637a9e5e4b146102665780637e28882214610279578063a5c82f1814610282578063aced1661146102a257600080fd5b8063501ec738116100ff578063501ec7381461019d578063527839b0146101d35780635aa6e675146102015780635b9d26581461021657806366b1a5de1461023657600080fd5b806301681a621461013c5780630a3d95d81461015157806312edde5e14610164578063431cc3dd14610177578063474a3b841461018a575b600080fd5b61014f61014a366004611f98565b61031f565b005b61014f61015f366004612084565b610465565b61014f6101723660046120bc565b610480565b61014f610185366004611fd0565b61064c565b61014f6101983660046120bc565b610b73565b6001546002546003546101bb926001600160a01b0390811692169083565b6040516101ca939291906121f2565b60405180910390f35b6101f36101e1366004611f98565b600a6020526000908152604090205481565b6040519081526020016101ca565b610209610b80565b6040516101ca91906121de565b6101f3610224366004611f98565b60066020526000908152604090205481565b6004546102439060ff1681565b60405190151581526020016101ca565b61014f6102613660046120ec565b610c2d565b61014f610274366004611f98565b610cf7565b6101f360095481565b6101f3610290366004611f98565b60056020526000908152604090205481565b610209610d5b565b61014f6102b836600461211b565b610dcb565b6101f36102cb366004611f98565b600b6020526000908152604090205481565b600754610209906001600160a01b031681565b61014f6102fe366004611fd0565b610f9a565b61014f6103113660046120ec565b6114b8565b6101f360085481565b6002600054141561034b5760405162461bcd60e51b8152600401610342906122b8565b60405180910390fd5b60026000556103586115bf565b6040516370a0823160e01b81526001600160a01b0382169063a9059cbb90339083906370a082319061038e9030906004016121de565b60206040518083038186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906120d4565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561042457600080fd5b505af1158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c91906120a0565b50506001600055565b61046d6115bf565b6004805460ff1916911515919091179055565b600260005414156104a35760405162461bcd60e51b8152600401610342906122b8565b6002600090815533815260056020526040902054156104f65760405162461bcd60e51b815260206004820152600f60248201526e4445504f5349545f50454e44494e4760881b6044820152606401610342565b600081116105375760405162461bcd60e51b815260206004820152600e60248201526d414d4f554e545f494e5f5a45524f60901b6044820152606401610342565b336000908152600a602052604090205481111561059857336000818152600a60205260409020546105839190309061056f9085612377565b6001546001600160a01b031692919061160b565b336000908152600a60205260408120556105c4565b336000908152600a60205260409020546105b3908290612377565b336000908152600a60205260409020555b336000908152600660205260409020546105df908290612320565b336000908152600660205260409020556009546105fd908290612320565b6009556001546040518281526001600160a01b039091169033907fcdb62e3f244f9959bd661d145243fc71558361230885919e11fcc84312d44c7d9060200160405180910390a3506001600055565b6002600054141561066f5760405162461bcd60e51b8152600401610342906122b8565b600260005561067c611669565b6001546002546040516370a0823160e01b81526001600160a01b039283169290911690600090819083906370a08231906106ba9030906004016121de565b60206040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a91906120d4565b90506000855167ffffffffffffffff81111561073657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561075f578160200160208202803683370190505b50905060005b86518110156108605760006006600089848151811061079457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905080856107cb9190612320565b9450808383815181106107ee57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506000600660008a858151811061082057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550508080610858906123ba565b915050610765565b50600083116108a05760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f57495448445241575360a01b6044820152606401610342565b604051627b8a6760e11b81526000906001600160a01b0387169062f714ce906108cf9087903090600401612216565b602060405180830381600087803b1580156108e957600080fd5b505af11580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092191906120d4565b9050600083866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161095291906121de565b60206040518083038186803b15801561096a57600080fd5b505afa15801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a291906120d4565b6109ac9190612377565b90508181146109f45760405162461bcd60e51b81526020600482015260146024820152730ae829ca8bea89e968a9ca6be9a92a69a82a886960631b6044820152606401610342565b6000805b8951811015610b18576000858281518110610a2357634e487b7160e01b600052603260045260246000fd5b602002602001015190506000811115610b0557600088610a438684612358565b610a4d9190612338565b905080600b60008e8681518110610a7457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054610aa79190612320565b600b60008e8681518110610acb57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555083610b01906123ba565b9350505b5080610b10816123ba565b9150506109f8565b5085600954610b279190612377565b60095560408051838152602081018390527f253f39873a287fb2801f5e791a591779d3ff3e219ec7c9793784a25ba658a759910160405180910390a15050600160005550505050505050565b610b7b6115bf565b600355565b6001546000906001600160a01b0316610bab5760405162461bcd60e51b815260040161034290612292565b60015460408051635aa6e67560e01b815290516001600160a01b0390921691635aa6e67591600480820192602092909190829003018186803b158015610bf057600080fd5b505afa158015610c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c289190611fb4565b905090565b60026000541415610c505760405162461bcd60e51b8152600401610342906122b8565b600260009081556001600160a01b0382168152600a6020526040902054821115610ca75760405162461bcd60e51b81526020600482015260086024820152674e4f5f46554e445360c01b6044820152606401610342565b6001600160a01b0381166000908152600a6020526040902054610ccb908390612377565b6001600160a01b038083166000908152600a602052604090209190915560015461045c911682846116bf565b610cff6115bf565b6007546040516001600160a01b038084169216907f0c1d6fac887f995d8165f884c34f3de9a2e4c9707aacccf2cf22812377c280af90600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6001546000906001600160a01b0316610d865760405162461bcd60e51b815260040161034290612292565b6001546040805163aced166160e01b815290516001600160a01b039092169163aced166191600480820192602092909190829003018186803b158015610bf057600080fd5b60026000541415610dee5760405162461bcd60e51b8152600401610342906122b8565b6002600055610dfd81836116f4565b600254610e15906001600160a01b031633308661160b565b600354600954600854600154604080516318160ddd60e01b81529051889493926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610e6457600080fd5b505afa158015610e78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9c91906120d4565b610ea69190612320565b610eb09190612377565b610eba9190612320565b1115610efd5760405162461bcd60e51b815260206004820152601260248201527113505617d31253525517d15610d15151115160721b6044820152606401610342565b6001600160a01b038116600090815260056020526040902054610f21908490612320565b6001600160a01b038216600090815260056020526040902055600854610f48908490612320565b6008556001546040518481526001600160a01b03918216918316907f4ed1a8a57a37b79833de68b3bc01307fc91c77341a669fc487f7e588f986d5ff9060200160405180910390a35050600160005550565b60026000541415610fbd5760405162461bcd60e51b8152600401610342906122b8565b6002600055610fca611669565b6001546040516370a0823160e01b81526001600160a01b0390911690600090819083906370a08231906110019030906004016121de565b60206040518083038186803b15801561101957600080fd5b505afa15801561102d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105191906120d4565b90506000845167ffffffffffffffff81111561107d57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156110a6578160200160208202803683370190505b50905060005b85518110156111a7576000600560008884815181106110db57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905080856111129190612320565b94508083838151811061113557634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060006005600089858151811061116757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555050808061119f906123ba565b9150506110ac565b50600083116111e65760405162461bcd60e51b815260206004820152600b60248201526a4e4f5f4445504f5349545360a81b6044820152606401610342565b604051636e553f6560e01b81526000906001600160a01b03861690636e553f65906112179087903090600401612216565b602060405180830381600087803b15801561123157600080fd5b505af1158015611245573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126991906120d4565b9050600083866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161129a91906121de565b60206040518083038186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ea91906120d4565b6112f49190612377565b905081811461133a5760405162461bcd60e51b8152602060048201526012602482015271098a0bea89e968a9ca6be9a92a69a82a886960731b6044820152606401610342565b6000805b885181101561145e57600085828151811061136957634e487b7160e01b600052603260045260246000fd5b60200260200101519050600081111561144b576000886113898684612358565b6113939190612338565b905080600a60008d86815181106113ba57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020546113ed9190612320565b600a60008d868151811061141157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555083611447906123ba565b9350505b5080611456816123ba565b91505061133e565b508560085461146d9190612377565b60085560408051838152602081018390527f8211507759e56fdc649418f9277798429bc90613b9b4a54e7b08458538b5b6f0910160405180910390a150506001600055505050505050565b600260005414156114db5760405162461bcd60e51b8152600401610342906122b8565b6002600055816115215760405162461bcd60e51b81526020600482015260116024820152701253959053125117d05353d5539513d555607a1b6044820152606401610342565b6001600160a01b0381166000908152600b6020526040902054611545908390612377565b6001600160a01b038083166000908152600b6020526040902091909155600254611571911682846116bf565b6001546040518381526001600160a01b03918216918316907fce67cd4e23f137729b8b844fbf25399d5130346f0d62c18afdc0a943e1d1f1019060200160405180910390a350506001600055565b336115c8610b80565b6001600160a01b0316146116095760405162461bcd60e51b815260206004820152600860248201526727a7262cafa3a7ab60c11b6044820152606401610342565b565b611663846323b872dd60e01b85858560405160240161162c939291906121f2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117ac565b50505050565b611671610d5b565b6001600160a01b0316336001600160a01b0316146116095760405162461bcd60e51b815260206004820152600b60248201526a27a7262cafa5a2a2a822a960a91b6044820152606401610342565b6040516001600160a01b0383166024820152604481018290526116ef90849063a9059cbb60e01b9060640161162c565b505050565b60045460ff16156117585760075461171890839083906001600160a01b031661187e565b6117585760405162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b6044820152606401610342565b33600090815260066020526040902054156117a85760405162461bcd60e51b815260206004820152601060248201526f57495448445241575f50454e44494e4760801b6044820152606401610342565b5050565b6000611801826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a839092919063ffffffff16565b8051909150156116ef578080602001905181019061181f91906120a0565b6116ef5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610342565b60408051808201825260078152662130ba31b432b960c91b602091820152815180830183526001808252603160f81b9183019190915282517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818401527fe9d76cee0cf4473cddcc3e081ef9f2caab96302d23d7ba675ea190f2188e546f818501527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101919091523060a0808301919091528351808303909101815260c08201909352825192909101919091206000918290611988907f2fe9f7b6a29d4dd4b42345a1abcb25508fd8a183b707ff2d4a5130e9ccb1926190889060e001612216565b604051602081830303815290604052805190602001209050600082826040516020016119cb92919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905060006119ef8288611a9a565b9050856001600160a01b0316816001600160a01b031614611a4d5760405162461bcd60e51b815260206004820152601860248201527745434453413a20496e76616c696420617574686f7269747960401b6044820152606401610342565b6001600160a01b038116611a735760405162461bcd60e51b815260040161034290612260565b60019450505050505b9392505050565b6060611a928484600085611abe565b949350505050565b6000806000611aa98585611bef565b91509150611ab681611c5f565b509392505050565b606082471015611b1f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610342565b6001600160a01b0385163b611b765760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b600080866001600160a01b03168587604051611b9291906121c2565b60006040518083038185875af1925050503d8060008114611bcf576040519150601f19603f3d011682016040523d82523d6000602084013e611bd4565b606091505b5091509150611be4828286611e33565b979650505050505050565b600080825160411415611c265760208301516040840151606085015160001a611c1a87828585611e6c565b94509450505050611c58565b825160401415611c505760208301516040840151611c45868383611f4f565b935093505050611c58565b506000905060025b9250929050565b6000816004811115611c8157634e487b7160e01b600052602160045260246000fd5b1415611c8a5750565b6001816004811115611cac57634e487b7160e01b600052602160045260246000fd5b1415611cca5760405162461bcd60e51b815260040161034290612260565b6002816004811115611cec57634e487b7160e01b600052602160045260246000fd5b1415611d3a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610342565b6003816004811115611d5c57634e487b7160e01b600052602160045260246000fd5b1415611db55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610342565b6004816004811115611dd757634e487b7160e01b600052602160045260246000fd5b1415611e305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610342565b50565b60608315611e42575081611a7c565b825115611e525782518084602001fd5b8160405162461bcd60e51b8152600401610342919061222d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115611e995750600090506003611f46565b8460ff16601b14158015611eb157508460ff16601c14155b15611ec25750600090506004611f46565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611f16573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611f3f57600060019250925050611f46565b9150600090505b94509492505050565b6000806001600160ff1b03831681611f6c60ff86901c601b612320565b9050611f7a87828885611e6c565b935093505050935093915050565b8035611f9381612401565b919050565b600060208284031215611fa9578081fd5b8135611a7c81612401565b600060208284031215611fc5578081fd5b8151611a7c81612401565b60006020808385031215611fe2578182fd5b823567ffffffffffffffff80821115611ff9578384fd5b818501915085601f83011261200c578384fd5b81358181111561201e5761201e6123eb565b8060051b915061202f8483016122ef565b8181528481019084860184860187018a1015612049578788fd5b8795505b83861015612077578035945061206285612401565b8483526001959095019491860191860161204d565b5098975050505050505050565b600060208284031215612095578081fd5b8135611a7c81612416565b6000602082840312156120b1578081fd5b8151611a7c81612416565b6000602082840312156120cd578081fd5b5035919050565b6000602082840312156120e5578081fd5b5051919050565b600080604083850312156120fe578081fd5b82359150602083013561211081612401565b809150509250929050565b60008060006060848603121561212f578081fd5b8335925060208085013567ffffffffffffffff8082111561214e578384fd5b818701915087601f830112612161578384fd5b813581811115612173576121736123eb565b612185601f8201601f191685016122ef565b9150808252888482850101111561219a578485fd5b808484018584013781019092018390525091506121b960408501611f88565b90509250925092565b600082516121d481846020870161238e565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b9182526001600160a01b0316602082015260400190565b602081526000825180602084015261224c81604085016020870161238e565b601f01601f19169190910160400192915050565b60208082526018908201527745434453413a20696e76616c6964207369676e617475726560401b604082015260600190565b6020808252600c908201526b4e554c4c5f4144445245535360a01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612318576123186123eb565b604052919050565b60008219821115612333576123336123d5565b500190565b60008261235357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612372576123726123d5565b500290565b600082821015612389576123896123d5565b500390565b60005b838110156123a9578181015183820152602001612391565b838111156116635750506000910152565b60006000198214156123ce576123ce6123d5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611e3057600080fd5b8015158114611e3057600080fdfea2646970667358221220e2239f5ccc26b795995c75f277acb7e112c687ba2711beb02d17b54f953c5c8564736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e0000000000000000000000001c4ceb52ab54a35f9d03fcc156a7c57f965e081e000000000000000000000000000000000000000000000000000000e9feab0200
-----Decoded View---------------
Arg [0] : _verificationAuthority (address): 0x687f4304Df62449dBc6C95FE9A8cb1153d40D42e
Arg [1] : vaultAddress (address): 0x1C4ceb52ab54a35F9d03FcC156a7c57F965e081e
Arg [2] : maxAmount (uint256): 1005000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e
Arg [1] : 0000000000000000000000001c4ceb52ab54a35f9d03fcc156a7c57f965e081e
Arg [2] : 000000000000000000000000000000000000000000000000000000e9feab0200
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.999956 | 12,900.2777 | $12,899.71 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.