Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17607166 | 426 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x0F2630Fa...aab426026 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
proxywallet
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-07-03 */ // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.20; /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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); } library TransferHelper { function safeApprove(address token, address to, uint value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint value) internal { (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: ETH_TRANSFER_FAILED'); } } 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 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-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 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); } } 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); } } } /// Transfer Helper to ensure the correct transfer of the tokens or ETH library SafeTransfer { using Address for address; /** Safe Transfer asset from one wallet with approval of the wallet * @param erc20: the contract address of the erc20 token * @param from: the wallet to take from * @param amount: the amount to take from the wallet **/ function _pullUnderlying(IERC20 erc20, address from, uint amount) internal { safeTransferFrom(erc20,from,address(this),amount); } 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)); } /** Safe Transfer asset to one wallet from within the contract * @param erc20: the contract address of the erc20 token * @param to: the wallet to send to * @param amount: the amount to send from the contract **/ function _pushUnderlying(IERC20 erc20, address to, uint amount) internal { safeTransfer(erc20,to,amount); } /** Safe Transfer ETH to one wallet from within the contract * @param to: the wallet to send to * @param value: the amount to send from the contract **/ function safeTransferETH(address to, uint256 value) internal { (bool success,) = to.call{value : value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } 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"); } } } contract proxywallet { //parent can only save lost tokens address public parent; address private tok; constructor(address user, address _tok) { parent = user; tok = _tok; } function savetokens(address token, address to, uint256 amount) external { require(msg.sender == parent, "p"); require(token != tok, "no tok"); SafeTransfer.safeTransfer(IERC20(token), to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"_tok","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"parent","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"savetokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610034575f3560e01c806321c4912e1461003857806360f96a8f1461004d575b5f80fd5b61004b6100463660046103c5565b61007b565b005b5f5461005f906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b5f546001600160a01b031633146100bd5760405162461bcd60e51b81526020600482015260016024820152600760fc1b60448201526064015b60405180910390fd5b6001546001600160a01b03908116908416036101045760405162461bcd60e51b81526020600482015260066024820152656e6f20746f6b60d01b60448201526064016100b4565b61010f838383610114565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261010f928692915f916101a3918516908490610220565b80519091501561010f57808060200190518101906101c191906103fe565b61010f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100b4565b606061022e84845f85610236565b949350505050565b6060824710156102975760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100b4565b5f80866001600160a01b031685876040516102b29190610446565b5f6040518083038185875af1925050503d805f81146102ec576040519150601f19603f3d011682016040523d82523d5f602084013e6102f1565b606091505b50915091506103028783838761030d565b979650505050505050565b6060831561037b5782515f03610374576001600160a01b0385163b6103745760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100b4565b508161022e565b61022e83838151156103905781518083602001fd5b8060405162461bcd60e51b81526004016100b49190610461565b80356001600160a01b03811681146103c0575f80fd5b919050565b5f805f606084860312156103d7575f80fd5b6103e0846103aa565b92506103ee602085016103aa565b9150604084013590509250925092565b5f6020828403121561040e575f80fd5b8151801515811461041d575f80fd5b9392505050565b5f5b8381101561043e578181015183820152602001610426565b50505f910152565b5f8251610457818460208701610424565b9190910192915050565b602081525f825180602084015261047f816040850160208701610424565b601f01601f1916919091016040019291505056fea26469706673582212200a4f61d498105e1472e0c37aaec34283fe3643dffe36dd226aec398841282f8864736f6c63430008140033
Deployed Bytecode Sourcemap
10749:454:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10970:230;;;;;;:::i;:::-;;:::i;:::-;;10817:21;;;;;-1:-1:-1;;;;;10817:21:0;;;;;;-1:-1:-1;;;;;689:32:1;;;671:51;;659:2;644:18;10817:21:0;;;;;;;10970:230;11075:6;;-1:-1:-1;;;;;11075:6:0;11061:10;:20;11053:34;;;;-1:-1:-1;;;11053:34:0;;935:2:1;11053:34:0;;;917:21:1;974:1;954:18;;;947:29;-1:-1:-1;;;992:18:1;;;985:31;1033:18;;11053:34:0;;;;;;;;;11115:3;;-1:-1:-1;;;;;11115:3:0;;;11106:12;;;;11098:31;;;;-1:-1:-1;;;11098:31:0;;1264:2:1;11098:31:0;;;1246:21:1;1303:1;1283:18;;;1276:29;-1:-1:-1;;;1321:18:1;;;1314:36;1367:18;;11098:31:0;1062:329:1;11098:31:0;11140:52;11173:5;11181:2;11185:6;11140:25;:52::i;:::-;10970:230;;;:::o;8783:211::-;8927:58;;;-1:-1:-1;;;;;1588:32:1;;;8927:58:0;;;1570:51:1;1637:18;;;;1630:34;;;8927:58:0;;;;;;;;;;1543:18:1;;;;8927:58:0;;;;;;;;-1:-1:-1;;;;;8927:58:0;-1:-1:-1;;;8927:58:0;;;10477:69;;;;;;;;;;;;;;;;8900:86;;8920:5;;8927:58;-1:-1:-1;;10477:69:0;;:27;;;8927:58;;10477:27;:69::i;:::-;10561:17;;10451:95;;-1:-1:-1;10561:21:0;10557:179;;10658:10;10647:30;;;;;;;;;;;;:::i;:::-;10639:85;;;;-1:-1:-1;;;10639:85:0;;2159:2:1;10639:85:0;;;2141:21:1;2198:2;2178:18;;;2171:30;2237:34;2217:18;;;2210:62;-1:-1:-1;;;2288:18:1;;;2281:40;2338:19;;10639:85:0;1957:406:1;5803:229:0;5940:12;5972:52;5994:6;6002:4;6008:1;6011:12;5972:21;:52::i;:::-;5965:59;5803:229;-1:-1:-1;;;;5803:229:0:o;6288:455::-;6458:12;6516:5;6491:21;:30;;6483:81;;;;-1:-1:-1;;;6483:81:0;;2570:2:1;6483:81:0;;;2552:21:1;2609:2;2589:18;;;2582:30;2648:34;2628:18;;;2621:62;-1:-1:-1;;;2699:18:1;;;2692:36;2745:19;;6483:81:0;2368:402:1;6483:81:0;6576:12;6590:23;6617:6;-1:-1:-1;;;;;6617:11:0;6636:5;6643:4;6617:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6575:73;;;;6666:69;6693:6;6701:7;6710:10;6722:12;6666:26;:69::i;:::-;6659:76;6288:455;-1:-1:-1;;;;;;;6288:455:0:o;7039:644::-;7224:12;7253:7;7249:427;;;7281:10;:17;7302:1;7281:22;7277:290;;-1:-1:-1;;;;;5542:19:0;;;7491:60;;;;-1:-1:-1;;;7491:60:0;;3524:2:1;7491:60:0;;;3506:21:1;3563:2;3543:18;;;3536:30;3602:31;3582:18;;;3575:59;3651:18;;7491:60:0;3322:353:1;7491:60:0;-1:-1:-1;7588:10:0;7581:17;;7249:427;7631:33;7639:10;7651:12;7852:17;;:21;7848:388;;8084:10;8078:17;8141:15;8128:10;8124:2;8120:19;8113:44;7848:388;8211:12;8204:20;;-1:-1:-1;;;8204:20:0;;;;;;;;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:328::-;269:6;277;285;338:2;326:9;317:7;313:23;309:32;306:52;;;354:1;351;344:12;306:52;377:29;396:9;377:29;:::i;:::-;367:39;;425:38;459:2;448:9;444:18;425:38;:::i;:::-;415:48;;510:2;499:9;495:18;482:32;472:42;;192:328;;;;;:::o;1675:277::-;1742:6;1795:2;1783:9;1774:7;1770:23;1766:32;1763:52;;;1811:1;1808;1801:12;1763:52;1843:9;1837:16;1896:5;1889:13;1882:21;1875:5;1872:32;1862:60;;1918:1;1915;1908:12;1862:60;1941:5;1675:277;-1:-1:-1;;;1675:277:1:o;2775:250::-;2860:1;2870:113;2884:6;2881:1;2878:13;2870:113;;;2960:11;;;2954:18;2941:11;;;2934:39;2906:2;2899:10;2870:113;;;-1:-1:-1;;3017:1:1;2999:16;;2992:27;2775:250::o;3030:287::-;3159:3;3197:6;3191:13;3213:66;3272:6;3267:3;3260:4;3252:6;3248:17;3213:66;:::i;:::-;3295:16;;;;;3030:287;-1:-1:-1;;3030:287:1:o;3680:396::-;3829:2;3818:9;3811:21;3792:4;3861:6;3855:13;3904:6;3899:2;3888:9;3884:18;3877:34;3920:79;3992:6;3987:2;3976:9;3972:18;3967:2;3959:6;3955:15;3920:79;:::i;:::-;4060:2;4039:15;-1:-1:-1;;4035:29:1;4020:45;;;;4067:2;4016:54;;3680:396;-1:-1:-1;;3680:396:1:o
Swarm Source
ipfs://0a4f61d498105e1472e0c37aaec34283fe3643dffe36dd226aec398841282f88
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.