Overview
AVAX Balance
0 AVAX
AVAX Value
$0.00More Info
Private Name Tags
ContractCreator
Sponsored
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60c03461 | 45677256 | 113 days ago | IN | 0 AVAX | 0.0315276 |
Latest 5 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
48179213 | 53 days ago | Contract Creation | 0 AVAX | |||
45716031 | 112 days ago | Contract Creation | 0 AVAX | |||
45711409 | 112 days ago | Contract Creation | 0 AVAX | |||
45683385 | 113 days ago | Contract Creation | 0 AVAX | |||
45682889 | 113 days ago | Contract Creation | 0 AVAX |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RemoteEscrowDeployer
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {RemoteEscrow} from "./RemoteEscrow.sol"; import {BaseEscrowDeployer, CREATE3} from "./BaseEscrowDeployer.sol"; /// @title RemoteEscrowDeployer /// @notice Contract for deploying RemoteEscrow contracts contract RemoteEscrowDeployer is BaseEscrowDeployer { address public immutable vault; constructor(address _messenger, address _vault) BaseEscrowDeployer(_messenger) { vault = _vault; } /// @notice Deploys a new escrow contract /// /// @param user The address of the user for whom the escrow contract is being deployed /// /// @return escrow The address of the deployed escrow contract function deploy(address user) external override returns (address escrow) { escrow = CREATE3.deploy( keccak256(abi.encodePacked(user)), abi.encodePacked(type(RemoteEscrow).creationCode, abi.encode(messenger, vault)), 0 ); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {IPhutureOnMessageCallback} from "../interfaces/IPhutureOnMessageCallback.sol"; import {IVault} from "../interfaces/IVault.sol"; import {BaseEscrow} from "./BaseEscrow.sol"; import {EscrowCallLib} from "./libraries/EscrowCallLib.sol"; contract RemoteEscrow is BaseEscrow, IPhutureOnMessageCallback { using EscrowCallLib for *; /// @dev The address of the Vault contract address public immutable vault; constructor(address _messenger, address _vault) BaseEscrow(_messenger) { vault = _vault; } /// @notice Callback function for handling messages from Phuture messenger /// /// @dev `data` is expected to be encoded as `WithdrawParams` /// /// @param snapshot The snapshot id to withdraw from /// @param kAmount The amount of K value to withdraw function phutureOnMessageCallbackV1(uint256 snapshot, uint256 kAmount, bytes calldata payload) external { if (msg.sender != messenger) revert Forbidden(); _lock(); if (kAmount != 0) try IVault(vault).withdraw(snapshot, kAmount, address(this)) {} catch {} (EscrowCallLib.Trade[] memory trades, EscrowCallLib.Target memory callback) = abi.decode(payload, (EscrowCallLib.Trade[], EscrowCallLib.Target)); for (uint256 i; i < trades.length; ++i) { // additional withdrawals also use Trade struct trades[i].callNotSelf(); } _executeCallback(callback); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {IEscrowDeployer} from "./interfaces/IEscrowDeployer.sol"; import {CREATE3} from "solmate/utils/CREATE3.sol"; /// @title BaseEscrowDeployer /// @notice Contract for deploying escrow contracts abstract contract BaseEscrowDeployer is IEscrowDeployer { /// @dev The address of the Messenger contract address public immutable messenger; constructor(address _messenger) { messenger = _messenger; } /// @notice Predicts the address of the escrow contract for a user /// /// @param user The address of the user for whom the escrow contract is being predicted /// /// @return escrow The address of the predicted escrow contract /// @return deployed Whether the escrow contract has been deployed function escrowOf(address user) external view override returns (address escrow, bool deployed) { escrow = CREATE3.getDeployed(keccak256(abi.encodePacked(user))); deployed = _deployed(escrow); } /// @dev Checks if a contract is deployed at a given address /// /// @param _addr The address to check /// /// @return result Whether a contract is deployed at the given address function _deployed(address _addr) private view returns (bool result) { assembly ("memory-safe") { result := extcodesize(_addr) } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; interface IPhutureOnMessageCallback { function phutureOnMessageCallbackV1(uint256 snapshot, uint256 kAmount, bytes calldata data) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; import {Currency} from "../libraries/CurrencyLib.sol"; import {a160u96} from "../utils/a160u96.sol"; interface IVault { struct CurrencyWithdrawal { uint256[] currencyIndexSet; uint96[] amounts; } struct SnapshotAnatomy { a160u96[] currencies; uint256[] currencyIndexSet; } struct EndRebalancingParams { a160u96[] anatomyCurrencies; SnapshotAnatomy newAnatomy; CurrencyWithdrawal withdrawals; uint256 lastKBalance; Currency[] currencies; } struct RebalancingResult { uint256 chainId; uint256 snapshot; uint256[] currencyIdSet; a160u96[] currencies; } struct RegisterCurrenciesResult { Currency[] currencies; bytes32 currenciesHash; } function setOrderBook(address _orderBook) external; function setMessenger(address _messenger) external; function startRebalancingPhase(CurrencyWithdrawal calldata withdrawals) external; function finishRebalancingPhase(EndRebalancingParams calldata params) external returns (bytes32); function transferLatestSnapshot(address recipient, uint256 kAmountWads) external returns (uint256); function withdraw(uint256 snapshot, uint256 kAmount, address recipient) external; function registerCurrencies(Currency[] calldata currencies) external returns (RegisterCurrenciesResult memory); function donate(Currency currency, bytes memory data) external; function consume(Currency currency, uint96 amount, address target, bytes calldata data) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {IPhutureEscrowCallbackBuilder} from "./interfaces/IPhutureEscrowCallbackBuilder.sol"; import {IPhutureEscrowCallback} from "./interfaces/IPhutureEscrowCallback.sol"; import {IEscrow} from "./interfaces/IEscrow.sol"; import {EscrowCallLib} from "./libraries/EscrowCallLib.sol"; abstract contract BaseEscrow is IEscrow { using EscrowCallLib for *; uint256 private locked = 1; /// @dev The address of the Messenger contract, set during contract deployment address public immutable messenger; /// @notice Thrown when an unauthorized caller attempts to execute a callback /// @dev Only the RemoteMessenger contract is allowed to execute the callback error Forbidden(); error Reentrancy(); constructor(address _messenger) { messenger = _messenger; } receive() external payable {} function phutureOnCallbackReceived(EscrowCallLib.Target[] calldata targets, EscrowCallLib.Target calldata callback) external { if (msg.sender != address(this)) revert Forbidden(); _lock(); for (uint256 i; i < targets.length; ++i) { targets[i].callNotSelf(); } _executeCallback(callback); } function _executeCallback(EscrowCallLib.Target memory callback) internal { if (callback.addr != address(0)) { (EscrowCallLib.Target[] memory nextTargets, EscrowCallLib.Target memory nextCallback) = IPhutureEscrowCallbackBuilder(callback.addr).phutureCreateTarget{value: callback.value}(callback.data); _unlock(); IPhutureEscrowCallback(address(this)).phutureOnCallbackReceived(nextTargets, nextCallback); } else { _unlock(); } } function _lock() internal { if (locked != 1) revert Reentrancy(); locked = 2; } function _unlock() internal { locked = 1; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {CurrencyLib, Currency} from "src/libraries/CurrencyLib.sol"; library EscrowCallLib { using CurrencyLib for Currency; struct Trade { bool skipRevert; Currency currency; address allowanceTarget; address addr; uint256 value; bytes data; } struct Target { bool skipRevert; address addr; uint256 value; bytes data; } error SelfCall(); error TradeFailed(); error TargetFailed(); function callNotSelf(Trade memory self) internal { if (self.addr == address(this)) revert SelfCall(); uint256 balance = self.currency.balanceOfSelf(); bool approve = self.allowanceTarget != address(0) && balance != 0; if (approve) self.currency.approve(self.allowanceTarget, balance); // if currency is Native and no value passed - use current balance as value if (self.currency.isNative() && self.value == 0) self.value = balance; (bool success, bytes memory returnData) = self.addr.call{value: self.value}(self.data); if (!self.skipRevert && !success) { if (returnData.length == 0) revert TradeFailed(); assembly { revert(add(returnData, 32), mload(returnData)) } } if (approve) self.currency.approve(self.allowanceTarget, 0); } function callNotSelf(Target memory self) internal { if (self.addr == address(this)) revert SelfCall(); (bool success, bytes memory returnData) = self.addr.call{value: self.value}(self.data); if (!self.skipRevert && !success) { if (returnData.length == 0) revert TargetFailed(); assembly { revert(add(returnData, 32), mload(returnData)) } } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; /// @title IEscrowDeployer /// @dev Interface for the EscrowDeployer contract, which manages the deployment and tracking of Escrow contracts interface IEscrowDeployer { /// @notice Deploys a new Escrow contract for the specified user /// /// @param user The address of the user for whom the Escrow contract is deployed /// /// @return escrow The address of the newly deployed Escrow contract function deploy(address user) external returns (address escrow); /// @notice Retrieves the address and deployment status of the Escrow contract associated with the given owner /// /// @param owner The address of the owner for whom to retrieve the Escrow contract information /// /// @return escrow The address of the Escrow contract associated with the owner /// @return deployed A boolean indicating whether the Escrow contract has been deployed for the owner function escrowOf(address owner) external view returns (address escrow, bool deployed); /// @notice Retrieves the address of the Messenger contract associated with the EscrowDeployer /// /// @return The address of the Messenger contract function messenger() external view returns (address); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {Bytes32AddressLib} from "./Bytes32AddressLib.sol"; /// @notice Deploy to deterministic addresses without an initcode factor. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol) /// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol) library CREATE3 { using Bytes32AddressLib for bytes32; //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size // // 0x37 | 0x37 | CALLDATACOPY | // // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x34 | 0x34 | CALLVALUE | value 0 size // // 0xf0 | 0xf0 | CREATE | newContract // //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode // // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode // // 0x52 | 0x52 | MSTORE | // // 0x60 | 0x6008 | PUSH1 08 | 8 // // 0x60 | 0x6018 | PUSH1 18 | 24 8 // // 0xf3 | 0xf3 | RETURN | // //--------------------------------------------------------------------------------// bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"; bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE); function deploy( bytes32 salt, bytes memory creationCode, uint256 value ) internal returns (address deployed) { bytes memory proxyChildBytecode = PROXY_BYTECODE; address proxy; /// @solidity memory-safe-assembly assembly { // Deploy a new contract with our pre-made bytecode via CREATE2. // We start 32 bytes into the code to avoid copying the byte length. proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt) } require(proxy != address(0), "DEPLOYMENT_FAILED"); deployed = getDeployed(salt); (bool success, ) = proxy.call{value: value}(creationCode); require(success && deployed.code.length != 0, "INITIALIZATION_FAILED"); } function getDeployed(bytes32 salt) internal view returns (address) { return getDeployed(salt, address(this)); } function getDeployed(bytes32 salt, address creator) internal pure returns (address) { address proxy = keccak256( abi.encodePacked( // Prefix: bytes1(0xFF), // Creator: creator, // Salt: salt, // Bytecode hash: PROXY_BYTECODE_HASH ) ).fromLast20Bytes(); return keccak256( abi.encodePacked( // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01) // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) hex"d6_94", proxy, hex"01" // Nonce of the proxy contract (1) ) ).fromLast20Bytes(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; type Currency is address; using {eq as ==, neq as !=} for Currency global; function eq(Currency currency, Currency other) pure returns (bool) { return Currency.unwrap(currency) == Currency.unwrap(other); } function neq(Currency currency, Currency other) pure returns (bool) { return !eq(currency, other); } /// @title CurrencyLibrary /// @dev This library allows for transferring and holding native tokens and ERC20 tokens /// @author Modified from Uniswap (https://github.com/Uniswap/v4-core/blob/main/src/types/Currency.sol) library CurrencyLib { using SafeERC20 for IERC20; using CurrencyLib for Currency; /// @dev Currency wrapper for native currency Currency public constant NATIVE = Currency.wrap(address(0)); /// @notice Thrown when a native transfer fails error NativeTransferFailed(); /// @notice Thrown when an ERC20 transfer fails error ERC20TransferFailed(); /// @notice Thrown when deposit amount exceeds current balance error AmountExceedsBalance(); /// @notice Transfers currency /// /// @param currency Currency to transfer /// @param to Address of recipient /// @param amount Currency amount ot transfer function transfer(Currency currency, address to, uint256 amount) internal { if (amount == 0) return; // implementation from // https://github.com/transmissions11/solmate/blob/e8f96f25d48fe702117ce76c79228ca4f20206cb/src/utils/SafeTransferLib.sol bool success; if (currency.isNative()) { assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } if (!success) revert NativeTransferFailed(); } else { assembly { // We'll write our calldata to this slot below, but restore it later. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because that's the total length of our calldata (4 + 32 * 2) // Counterintuitively, this call() must be positioned after the or() in the // surrounding and() because and() evaluates its arguments from right to left. call(gas(), currency, 0, freeMemoryPointer, 68, 0, 32) ) } if (!success) revert ERC20TransferFailed(); } } /// @notice Approves currency /// /// @param currency Currency to approve /// @param spender Address of spender /// @param amount Currency amount to approve function approve(Currency currency, address spender, uint256 amount) internal { if (isNative(currency)) return; IERC20(Currency.unwrap(currency)).forceApprove(spender, amount); } /// @notice Returns the balance of a given currency for a specific account /// /// @param currency The currency to check /// @param account The address of the account /// /// @return The balance of the specified currency for the given account function balanceOf(Currency currency, address account) internal view returns (uint256) { return currency.isNative() ? account.balance : IERC20(Currency.unwrap(currency)).balanceOf(account); } /// @notice Returns the balance of a given currency for this contract /// /// @param currency The currency to check /// /// @return The balance of the specified currency for this contract function balanceOfSelf(Currency currency) internal view returns (uint256) { return currency.isNative() ? address(this).balance : IERC20(Currency.unwrap(currency)).balanceOf(address(this)); } /// @notice Checks if the specified currency is the native currency /// /// @param currency The currency to check /// /// @return `true` if the specified currency is the native currency, `false` otherwise function isNative(Currency currency) internal pure returns (bool) { return currency == NATIVE; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {Currency} from "../libraries/CurrencyLib.sol"; type a160u96 is uint256; using {addr, unpack, unpackRaw, currency, value, eq as ==, neq as !=} for a160u96 global; error AddressMismatch(address, address); function neq(a160u96 a, a160u96 b) pure returns (bool) { return !eq(a, b); } function eq(a160u96 a, a160u96 b) pure returns (bool) { return a160u96.unwrap(a) == a160u96.unwrap(b); } function currency(a160u96 packed) pure returns (Currency) { return Currency.wrap(addr(packed)); } function addr(a160u96 packed) pure returns (address) { return address(uint160(a160u96.unwrap(packed))); } function value(a160u96 packed) pure returns (uint96) { return uint96(a160u96.unwrap(packed) >> 160); } function unpack(a160u96 packed) pure returns (Currency _curr, uint96 _value) { uint256 raw = a160u96.unwrap(packed); _curr = Currency.wrap(address(uint160(raw))); _value = uint96(raw >> 160); } function unpackRaw(a160u96 packed) pure returns (address _addr, uint96 _value) { uint256 raw = a160u96.unwrap(packed); _addr = address(uint160(raw)); _value = uint96(raw >> 160); } library A160U96Factory { function create(address _addr, uint96 _value) internal pure returns (a160u96) { return a160u96.wrap((uint256(_value) << 160) | uint256(uint160(_addr))); } function create(Currency _currency, uint96 _value) internal pure returns (a160u96) { return create(Currency.unwrap(_currency), _value); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; import {EscrowCallLib} from "../libraries/EscrowCallLib.sol"; interface IPhutureEscrowCallbackBuilder { function phutureCreateTarget(bytes calldata data) external payable returns (EscrowCallLib.Target[] memory targets, EscrowCallLib.Target memory callback); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; import {EscrowCallLib} from "../libraries/EscrowCallLib.sol"; interface IPhutureEscrowCallback { function phutureOnCallbackReceived(EscrowCallLib.Target[] calldata targets, EscrowCallLib.Target calldata callback) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; import {EscrowCallLib} from "../libraries/EscrowCallLib.sol"; /// @title IEscrow /// @dev Interface for the Escrow contract interface IEscrow { function phutureOnCallbackReceived(EscrowCallLib.Target[] calldata targets, EscrowCallLib.Target calldata callback) external; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Library for converting between addresses and bytes32 values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Bytes32AddressLib.sol) library Bytes32AddressLib { function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) { return address(uint160(uint256(bytesValue))); } function fillLast12Bytes(address addressValue) internal pure returns (bytes32) { return bytes32(bytes20(addressValue)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "@openzeppelin/contracts/=lib/phuture-v2-contracts/lib/@openzeppelin/contracts/", "chainlink/=lib/phuture-v2-contracts/lib/chainlink-brownie-contracts/contracts/", "forge-std/=lib/forge-std/src/", "layerzero/=lib/phuture-v2-contracts/lib/LayerZero/contracts/", "redstone/=lib/phuture-v2-contracts/lib/redstone-oracles-monorepo/packages/evm-connector/contracts/", "solmate/=lib/phuture-v2-contracts/lib/solmate/src/", "src/=lib/phuture-v2-contracts/src/", "sstore2/=lib/phuture-v2-contracts/lib/sstore2/contracts/", "@chainlink/=node_modules/@chainlink/", "@eth-optimism/=node_modules/@eth-optimism/", "@openzeppelin/contracts-upgradeable/=lib/phuture-v2-contracts/lib/openzeppelin-contracts-upgradeable/contracts/", "@redstone-finance/=node_modules/@redstone-finance/", "LayerZero/=lib/phuture-v2-contracts/lib/LayerZero/contracts/", "chainlink-brownie-contracts/=lib/phuture-v2-contracts/lib/chainlink-brownie-contracts/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/phuture-v2-contracts/lib/@openzeppelin/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/phuture-v2-contracts/lib/openzeppelin-contracts-upgradeable/", "openzeppelin/=lib/phuture-v2-contracts/lib/@openzeppelin/contracts/", "phuture-v2-contracts/=lib/phuture-v2-contracts/", "redstone-oracles-monorepo/=lib/phuture-v2-contracts/lib/", "solady/=lib/phuture-v2-contracts/lib/solady/src/" ], "optimizer": { "enabled": true, "runs": 200, "details": { "constantOptimizer": true, "yul": true, "yulDetails": { "stackAllocation": true } } }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": false }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_messenger","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"deploy","outputs":[{"internalType":"address","name":"escrow","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"escrowOf","outputs":[{"internalType":"address","name":"escrow","type":"address"},{"internalType":"bool","name":"deployed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c03461008757601f61154238819003918201601f19168301916001600160401b0383118484101761008c57808492604094855283398101031261008757610052602061004b836100a2565b92016100a2565b9060805260a05260405161148b90816100b7823960805181818161017a0152610344015260a051818181606401526101a10152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100875756fe608060408181526004918236101561001657600080fd5b600092833560e01c9182633cb747bf14610330575081634c96a38914610107578163e038c3da14610097575063fbfa77cf1461005157600080fd5b34610093578160031936011261009357517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b83915034610093576020366003190112610093576001600160a01b0391903590828216820361010457506100f390835160208101916001600160601b03199060601b168252601481526100e981610373565b519020309061041e565b825191811682523b15156020820152f35b80fd5b83915034610093576020928360031936011261032c576001600160a01b039180358381168103610328578251868101916001600160601b03199060601b1682526014815261015481610373565b51902082519490610fcc61016a888201886103a5565b8087526104bf88880139835190857f00000000000000000000000000000000000000000000000000000000000000001688830152857f00000000000000000000000000000000000000000000000000000000000000001685830152848252606082019667ffffffffffffffff92808910848a111761031557610212908988526102006101fa6080830180956103c7565b826103c7565b03607f1981018a52605f1901896103a5565b8161021b6103f2565b8a8151910186f591878316156102de57918492918361023c8194309061041e565b9a51925af1913d156102d7573d9182116102c457845191610266601f8201601f19168a01846103a5565b8252873d92013e5b806102ba575b1561028157505191168152f35b84606492519162461bcd60e51b8352820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152fd5b50833b1515610274565b634e487b7160e01b815260418452602490fd5b505061026e565b865162461bcd60e51b81528087018b905260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b634e487b7160e01b855260418652602485fd5b8480fd5b8280fd5b8490346100935781600319360112610093577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6040810190811067ffffffffffffffff82111761038f57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761038f57604052565b9081519160005b8381106103df575050016000815290565b80602080928401015181850152016103ce565b604051906103ff82610373565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b906104276103f2565b6020815191012060405190602082019360ff60f81b85526001600160601b0319809460601b1660218401526035830152605582015260558152608081019281841067ffffffffffffffff85111761038f5783604052815190209160a08201926135a560f21b845260601b1660a282015260b6600160f81b910152601782526104ae82610373565b905190206001600160a01b03169056fe60c03461008c57601f610fcc38819003918201601f19168301916001600160401b0383118484101761009157808492604094855283398101031261008c57610052602061004b836100a7565b92016100a7565b90600160005560805260a052604051610f1090816100bc823960805181818160e601526104ea015260a0518181816101a601526105660152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361008c5756fe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c908163216f3c6b1461005e575080633cb747bf14610059578063f11bc0c7146100545763fbfa77cf0361000e57610190565b610123565b6100d0565b346100bd5760603660031901126100bd576044356001600160401b038082116100b957366023830112156100b95781600401359081116100b95736602482840101116100b95760246100b692016024356004356104de565b80f35b8280fd5b80fd5b60009103126100cb57565b600080fd5b346100cb5760003660031901126100cb576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b908160809103126100cb5790565b346100cb5760403660031901126100cb576001600160401b036004358181116100cb57366023820112156100cb5780600401358281116100cb573660248260051b840101116100cb576024359283116100cb576024610189610019943690600401610115565b92016105f7565b346100cb5760003660031901126100cb576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b0382111761020657604052565b6101d5565b60c081019081106001600160401b0382111761020657604052565b6001600160401b03811161020657604052565b604081019081106001600160401b0382111761020657604052565b90601f801991011681019081106001600160401b0382111761020657604052565b6040513d6000823e3d90fd5b6001600160401b0381116102065760051b60200190565b801515036100cb57565b6001600160a01b038116036100cb57565b35906102be826102a2565b565b6001600160401b03811161020657601f01601f191660200190565b81601f820112156100cb578035906102f2826102c0565b926103006040519485610254565b828452602083830101116100cb57816000926020809301838601378301015290565b91906080838203126100cb576040519061033b826101eb565b8193803561034881610298565b83526020810135610358816102a2565b6020840152604081013560408401526060810135916001600160401b0383116100cb5760609261038892016102db565b910152565b6040929181810384136100cb576001600160401b0382358181116100cb5783019482601f870112156100cb5760209580356103c781610281565b926103d56040519485610254565b818452888085019260051b840101928684116100cb57898101925b848410610414575050505050948301359081116100cb576104119201610322565b90565b83358781116100cb5782019060c09081601f19848c0301126100cb57845161043b8161020b565b8d84013561044881610298565b81528d6104568786016102b3565b908201526060926104688486016102b3565b8783015260809361047a8587016102b3565b9083015260a0938486013590830152840135928a84116100cb576104a58f958680968f9201016102db565b908201528152019301926103f0565b80518210156104c85760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b92906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811633036105e5576105196106ea565b81610564575b505061052e925081019061038d565b909160005b8351811015610558578061055261054c600193876104b4565b5161073d565b01610533565b5091506102be90610ad9565b7f00000000000000000000000000000000000000000000000000000000000000001690813b156100cb57604051630ad58d2f60e01b81526004810195909552602485015230604485015261052e93906000908290606490829084905af16105cc575b8061051f565b806105d96105df92610226565b806100c0565b386105c6565b604051631dd2188d60e31b8152600490fd5b3033036105e5576106066106ea565b60005b828110610626575050506106216102be913690610322565b610ad9565b8060051b820135607e19833603018112156100cb576106489036908401610322565b602081810180516001600160a01b031630146106d857516001600160a01b031660008060409283860151906060870151918683519301915af161069a61069661068f61070d565b9551151590565b1590565b90816106cf575b506106b157505050600101610609565b8251156106bf575081519101fd5b516324fcb23360e01b8152600490fd5b905015386106a1565b6040516314d8f46160e21b8152600490fd5b6001600054036106fb576002600055565b60405163558a1e0360e11b8152600490fd5b3d15610738573d9061071e826102c0565b9161072c6040519384610254565b82523d6000602084013e565b606090565b6060810180516001600160a01b0390811630146106d85760208301805190939061076f906001600160a01b0316610bc2565b604082018051909491906001600160a01b03169384161515938461087b575b600092826107c59285948861085f575b505088516001600160a01b03161580610853575b610848575b50516001600160a01b031690565b60808401519060a085015191602083519301915af16107ef6106966107e861070d565b9351151590565b908161083f575b5061081e5750610804575050565b905190516102be916001600160a01b039182169116610c3a565b80511561082d57602081519101fd5b604051632d8ef0cf60e01b8152600490fd5b905015386107f6565b6080860152386107b7565b506080860151156107b2565b8a5161087492906001600160a01b0316610d32565b388161079e565b811515945061078e565b60005b8381106108985750506000910152565b8181015183820152602001610888565b91906080838203126100cb576040516108c0816101eb565b809380516108cd81610298565b825260208101516108dd816102a2565b6020830152604081015160408301526060810151906001600160401b0382116100cb57019082601f830112156100cb57815191610919836102c0565b936109276040519586610254565b838552602084830101116100cb576060926109489160208087019101610885565b0152565b9190916040818403126100cb578051926001600160401b03938481116100cb5782019381601f860112156100cb5784519460209561098981610281565b916109976040519384610254565b818352878084019260051b820101918583116100cb57888201905b8382106109d25750505050948301519081116100cb5761041192016108a8565b81518681116100cb578a916109ec898480948801016108a8565b8152019101906109b2565b90602091610a1081518092818552858086019101610885565b601f01601f1916010190565b9060206104119281815201906109f7565b90608060606104119380511515845260018060a01b0360208201511660208501526040810151604085015201519181606082015201906109f7565b90929160408201916040815284518093526060810160608460051b830101936020809701916000905b828210610aaf57505050506104119394506020818403910152610a2d565b909192958880610acb600193605f198982030186528a51610a2d565b980192019201909291610a91565b60208101516001600160a01b031691908215610bb5578060606040610b1e930151910151906040519485809263954aaddf60e01b825281600096879660048301610a1c565b03925af18015610b845781938291610b8d575b50610b3c6001600055565b303b15610b895760405163f11bc0c760e01b8152929383918291610b64919060048401610a68565b038183305af18015610b8457610b775750565b806105d96102be92610226565b610275565b5080fd5b9050610bac9193503d8085833e610ba48183610254565b81019061094c565b92909238610b31565b5090506102be6001600055565b6000906001600160a01b031680610bd95750504790565b6020602491604051928380926370a0823160e01b82523060048301525afa918215610b84578092610c0957505090565b9091506020823d602011610c32575b81610c2560209383610254565b810103126100bd57505190565b3d9150610c18565b6001600160a01b039081168015610d2d57604051916000806020850163095ea7b360e01b938482528716602487015281604487015260448652610c7c866101eb565b85519082865af1610c8b61070d565b81610cfe575b5080610cf4575b15610ca4575b50505050565b60405160208101919091526001600160a01b0393909316602484015260006044808501919091528352610ceb92610ce690610ce0606482610254565b82610d8d565b610d8d565b38808080610c9e565b50813b1515610c98565b8051801592508215610d13575b505038610c91565b610d269250602080918301019101610d78565b3880610d0b565b505050565b9091906001600160a01b03908116908115610c9e5760008060405194602086019063095ea7b360e01b9485835288166024880152604487015260448652610c7c866101eb565b908160209103126100cb575161041181610298565b604051610deb916001600160a01b0316610da682610239565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1610de561070d565b91610e73565b805190828215928315610e5b575b50505015610e045750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b610e6b9350820181019101610d78565b388281610df9565b91929015610ed55750815115610e87575090565b3b15610e905790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610ee85750805190602001fd5b60405162461bcd60e51b815260206004820152908190610f0c9060248301906109f7565b0390fd0000000000000000000000008dd78e46642e14858f25aaa41b2b36c0bd6b444f000000000000000000000000e903f5a1d43d93407bcd11c771c03628539414d2
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c9182633cb747bf14610330575081634c96a38914610107578163e038c3da14610097575063fbfa77cf1461005157600080fd5b34610093578160031936011261009357517f000000000000000000000000e903f5a1d43d93407bcd11c771c03628539414d26001600160a01b03168152602090f35b5080fd5b83915034610093576020366003190112610093576001600160a01b0391903590828216820361010457506100f390835160208101916001600160601b03199060601b168252601481526100e981610373565b519020309061041e565b825191811682523b15156020820152f35b80fd5b83915034610093576020928360031936011261032c576001600160a01b039180358381168103610328578251868101916001600160601b03199060601b1682526014815261015481610373565b51902082519490610fcc61016a888201886103a5565b8087526104bf88880139835190857f0000000000000000000000008dd78e46642e14858f25aaa41b2b36c0bd6b444f1688830152857f000000000000000000000000e903f5a1d43d93407bcd11c771c03628539414d21685830152848252606082019667ffffffffffffffff92808910848a111761031557610212908988526102006101fa6080830180956103c7565b826103c7565b03607f1981018a52605f1901896103a5565b8161021b6103f2565b8a8151910186f591878316156102de57918492918361023c8194309061041e565b9a51925af1913d156102d7573d9182116102c457845191610266601f8201601f19168a01846103a5565b8252873d92013e5b806102ba575b1561028157505191168152f35b84606492519162461bcd60e51b8352820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152fd5b50833b1515610274565b634e487b7160e01b815260418452602490fd5b505061026e565b865162461bcd60e51b81528087018b905260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b634e487b7160e01b855260418652602485fd5b8480fd5b8280fd5b8490346100935781600319360112610093577f0000000000000000000000008dd78e46642e14858f25aaa41b2b36c0bd6b444f6001600160a01b03168152602090f35b6040810190811067ffffffffffffffff82111761038f57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761038f57604052565b9081519160005b8381106103df575050016000815290565b80602080928401015181850152016103ce565b604051906103ff82610373565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b906104276103f2565b6020815191012060405190602082019360ff60f81b85526001600160601b0319809460601b1660218401526035830152605582015260558152608081019281841067ffffffffffffffff85111761038f5783604052815190209160a08201926135a560f21b845260601b1660a282015260b6600160f81b910152601782526104ae82610373565b905190206001600160a01b03169056fe60c03461008c57601f610fcc38819003918201601f19168301916001600160401b0383118484101761009157808492604094855283398101031261008c57610052602061004b836100a7565b92016100a7565b90600160005560805260a052604051610f1090816100bc823960805181818160e601526104ea015260a0518181816101a601526105660152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361008c5756fe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c908163216f3c6b1461005e575080633cb747bf14610059578063f11bc0c7146100545763fbfa77cf0361000e57610190565b610123565b6100d0565b346100bd5760603660031901126100bd576044356001600160401b038082116100b957366023830112156100b95781600401359081116100b95736602482840101116100b95760246100b692016024356004356104de565b80f35b8280fd5b80fd5b60009103126100cb57565b600080fd5b346100cb5760003660031901126100cb576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b908160809103126100cb5790565b346100cb5760403660031901126100cb576001600160401b036004358181116100cb57366023820112156100cb5780600401358281116100cb573660248260051b840101116100cb576024359283116100cb576024610189610019943690600401610115565b92016105f7565b346100cb5760003660031901126100cb576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b0382111761020657604052565b6101d5565b60c081019081106001600160401b0382111761020657604052565b6001600160401b03811161020657604052565b604081019081106001600160401b0382111761020657604052565b90601f801991011681019081106001600160401b0382111761020657604052565b6040513d6000823e3d90fd5b6001600160401b0381116102065760051b60200190565b801515036100cb57565b6001600160a01b038116036100cb57565b35906102be826102a2565b565b6001600160401b03811161020657601f01601f191660200190565b81601f820112156100cb578035906102f2826102c0565b926103006040519485610254565b828452602083830101116100cb57816000926020809301838601378301015290565b91906080838203126100cb576040519061033b826101eb565b8193803561034881610298565b83526020810135610358816102a2565b6020840152604081013560408401526060810135916001600160401b0383116100cb5760609261038892016102db565b910152565b6040929181810384136100cb576001600160401b0382358181116100cb5783019482601f870112156100cb5760209580356103c781610281565b926103d56040519485610254565b818452888085019260051b840101928684116100cb57898101925b848410610414575050505050948301359081116100cb576104119201610322565b90565b83358781116100cb5782019060c09081601f19848c0301126100cb57845161043b8161020b565b8d84013561044881610298565b81528d6104568786016102b3565b908201526060926104688486016102b3565b8783015260809361047a8587016102b3565b9083015260a0938486013590830152840135928a84116100cb576104a58f958680968f9201016102db565b908201528152019301926103f0565b80518210156104c85760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b92906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811633036105e5576105196106ea565b81610564575b505061052e925081019061038d565b909160005b8351811015610558578061055261054c600193876104b4565b5161073d565b01610533565b5091506102be90610ad9565b7f00000000000000000000000000000000000000000000000000000000000000001690813b156100cb57604051630ad58d2f60e01b81526004810195909552602485015230604485015261052e93906000908290606490829084905af16105cc575b8061051f565b806105d96105df92610226565b806100c0565b386105c6565b604051631dd2188d60e31b8152600490fd5b3033036105e5576106066106ea565b60005b828110610626575050506106216102be913690610322565b610ad9565b8060051b820135607e19833603018112156100cb576106489036908401610322565b602081810180516001600160a01b031630146106d857516001600160a01b031660008060409283860151906060870151918683519301915af161069a61069661068f61070d565b9551151590565b1590565b90816106cf575b506106b157505050600101610609565b8251156106bf575081519101fd5b516324fcb23360e01b8152600490fd5b905015386106a1565b6040516314d8f46160e21b8152600490fd5b6001600054036106fb576002600055565b60405163558a1e0360e11b8152600490fd5b3d15610738573d9061071e826102c0565b9161072c6040519384610254565b82523d6000602084013e565b606090565b6060810180516001600160a01b0390811630146106d85760208301805190939061076f906001600160a01b0316610bc2565b604082018051909491906001600160a01b03169384161515938461087b575b600092826107c59285948861085f575b505088516001600160a01b03161580610853575b610848575b50516001600160a01b031690565b60808401519060a085015191602083519301915af16107ef6106966107e861070d565b9351151590565b908161083f575b5061081e5750610804575050565b905190516102be916001600160a01b039182169116610c3a565b80511561082d57602081519101fd5b604051632d8ef0cf60e01b8152600490fd5b905015386107f6565b6080860152386107b7565b506080860151156107b2565b8a5161087492906001600160a01b0316610d32565b388161079e565b811515945061078e565b60005b8381106108985750506000910152565b8181015183820152602001610888565b91906080838203126100cb576040516108c0816101eb565b809380516108cd81610298565b825260208101516108dd816102a2565b6020830152604081015160408301526060810151906001600160401b0382116100cb57019082601f830112156100cb57815191610919836102c0565b936109276040519586610254565b838552602084830101116100cb576060926109489160208087019101610885565b0152565b9190916040818403126100cb578051926001600160401b03938481116100cb5782019381601f860112156100cb5784519460209561098981610281565b916109976040519384610254565b818352878084019260051b820101918583116100cb57888201905b8382106109d25750505050948301519081116100cb5761041192016108a8565b81518681116100cb578a916109ec898480948801016108a8565b8152019101906109b2565b90602091610a1081518092818552858086019101610885565b601f01601f1916010190565b9060206104119281815201906109f7565b90608060606104119380511515845260018060a01b0360208201511660208501526040810151604085015201519181606082015201906109f7565b90929160408201916040815284518093526060810160608460051b830101936020809701916000905b828210610aaf57505050506104119394506020818403910152610a2d565b909192958880610acb600193605f198982030186528a51610a2d565b980192019201909291610a91565b60208101516001600160a01b031691908215610bb5578060606040610b1e930151910151906040519485809263954aaddf60e01b825281600096879660048301610a1c565b03925af18015610b845781938291610b8d575b50610b3c6001600055565b303b15610b895760405163f11bc0c760e01b8152929383918291610b64919060048401610a68565b038183305af18015610b8457610b775750565b806105d96102be92610226565b610275565b5080fd5b9050610bac9193503d8085833e610ba48183610254565b81019061094c565b92909238610b31565b5090506102be6001600055565b6000906001600160a01b031680610bd95750504790565b6020602491604051928380926370a0823160e01b82523060048301525afa918215610b84578092610c0957505090565b9091506020823d602011610c32575b81610c2560209383610254565b810103126100bd57505190565b3d9150610c18565b6001600160a01b039081168015610d2d57604051916000806020850163095ea7b360e01b938482528716602487015281604487015260448652610c7c866101eb565b85519082865af1610c8b61070d565b81610cfe575b5080610cf4575b15610ca4575b50505050565b60405160208101919091526001600160a01b0393909316602484015260006044808501919091528352610ceb92610ce690610ce0606482610254565b82610d8d565b610d8d565b38808080610c9e565b50813b1515610c98565b8051801592508215610d13575b505038610c91565b610d269250602080918301019101610d78565b3880610d0b565b505050565b9091906001600160a01b03908116908115610c9e5760008060405194602086019063095ea7b360e01b9485835288166024880152604487015260448652610c7c866101eb565b908160209103126100cb575161041181610298565b604051610deb916001600160a01b0316610da682610239565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1610de561070d565b91610e73565b805190828215928315610e5b575b50505015610e045750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b610e6b9350820181019101610d78565b388281610df9565b91929015610ed55750815115610e87575090565b3b15610e905790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610ee85750805190602001fd5b60405162461bcd60e51b815260206004820152908190610f0c9060248301906109f7565b0390fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008dd78e46642e14858f25aaa41b2b36c0bd6b444f000000000000000000000000e903f5a1d43d93407bcd11c771c03628539414d2
-----Decoded View---------------
Arg [0] : _messenger (address): 0x8dD78e46642e14858F25Aaa41B2B36c0bd6B444F
Arg [1] : _vault (address): 0xE903F5a1D43d93407Bcd11c771c03628539414d2
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008dd78e46642e14858f25aaa41b2b36c0bd6b444f
Arg [1] : 000000000000000000000000e903f5a1d43d93407bcd11c771c03628539414d2
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.