Address Contract Partially Verified
Address
0xE357273545C152f07afE2c38257B7b653FD3f6d0
Balance
0 ETH
Nonce
927
Code Size
945 bytes
Creator
0x93A7C464...5d3A at tx 0x3802d4d9...8bc8ff
Indexed Transactions
0
Contract Bytecode
945 bytes
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80638374d84b14610030575b600080fd5b6100eb6004803603606081101561004657600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561007657600080fd5b82018360208201111561008857600080fd5b803590602001918460018302840111640100000000831117156100aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610107945050505050565b604080516001600160a01b039092168252519081900360200190f35b60408051602080820185905233606090811b8385015283518084036034018152605484018552805190830120733d602d80600a3d3981f3363d3d373d3d3d363d7360601b60748501529087901b6bffffffffffffffffffffffff191660888401526e5af43d82803e903d91602b57fd5bf360881b609c8401528351808403608b01815260ab90930190935281516000939291839190830185f592506001600160a01b0383166101e75760405162461bcd60e51b815260040180806020018281038252603281526020018061031c6032913960400191505060405180910390fd5b6040805186815290516001600160a01b038516917feaa996f76fa9fcacd351918a2a275ae6d45845f79256ffbe8c0a87ca608e9970919081900360200190a2835115610312576000836001600160a01b0316856040518082805190602001908083835b602083106102695780518252601f19909201916020918201910161024a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146102cb576040519150601f19603f3d011682016040523d82523d6000602084013e6102d0565b606091505b50509050806103105760405162461bcd60e51b815260040180806020018281038252602e81526020018061034e602e913960400191505060405180910390fd5b505b5050939250505056fe4d696e696d616c50726f7879466163746f72792363726561746556657374696e673a204352454154494f4e5f4641494c45444d696e696d616c50726f7879466163746f72792363726561746556657374696e673a2043414c4c5f4641494c4544a26469706673582212204c3a3f1aabf25c74af9990c8d098ccc893836dab18774a23045021b96882199464736f6c634300060c0033
Verified Source Code Partial Match
Compiler: v0.6.12+commit.27d51765
EVM: istanbul
Optimization: Yes (200 runs)
MinimalProxyFactory.sol 175 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
contract MinimalProxyFactory {
using Address for address;
event VestingCreated(address indexed _address, bytes32 _salt);
constructor() public {
}
function createVesting(address _implementation, bytes32 _salt, bytes memory _data) public virtual returns (address addr) {
bytes32 salt = keccak256(abi.encodePacked(_salt, msg.sender));
// solium-disable-next-line security/no-inline-assembly
bytes memory slotcode = abi.encodePacked(
hex"3d602d80600a3d3981f3363d3d373d3d3d363d73",
_implementation,
hex"5af43d82803e903d91602b57fd5bf3"
);
assembly {
addr := create2(0, add(slotcode, 0x20), mload(slotcode), salt)
}
require(addr != address(0), "MinimalProxyFactory#createVesting: CREATION_FAILED");
emit VestingCreated(addr, _salt);
if (_data.length > 0) {
(bool success,) = addr.call(_data);
require(success, "MinimalProxyFactory#createVesting: CALL_FAILED");
}
}
}
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
createVesting 0x8374d84b
address _implementation
bytes32 _salt
bytes _data
returns: address
Recent Transactions
No transactions found for this address