ETH Price: $3,215.47 (-3.47%)

Contract

0x7b706466Ee101D6BEBBBc2c279c9D8c628b4cb25
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Weth10To Weth9127118972021-06-26 20:58:011235 days ago1624741081IN
0x7b706466...628b4cb25
0 ETH0.0013353525
Weth10To Weth9124224432021-05-12 23:09:351280 days ago1620860975IN
0x7b706466...628b4cb25
0.05 ETH0.0124796182.413
Weth9To Weth10124224332021-05-12 23:08:111280 days ago1620860891IN
0x7b706466...628b4cb25
0.09 ETH0.01436436215
Weth10To Weth9124224282021-05-12 23:07:361280 days ago1620860856IN
0x7b706466...628b4cb25
0 ETH0.01484583217
Weth9To Weth10124224112021-05-12 23:02:571280 days ago1620860577IN
0x7b706466...628b4cb25
0 ETH0.0164355246
0x60806040124222842021-05-12 22:34:591280 days ago1620858899IN
 Create: WethConverter
0 ETH0.05709053217

Latest 10 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
127118972021-06-26 20:58:011235 days ago1624741081
0x7b706466...628b4cb25
0.01 ETH
127118972021-06-26 20:58:011235 days ago1624741081
0x7b706466...628b4cb25
0.01 ETH
124224432021-05-12 23:09:351280 days ago1620860975
0x7b706466...628b4cb25
0.06 ETH
124224432021-05-12 23:09:351280 days ago1620860975
0x7b706466...628b4cb25
0.01 ETH
124224332021-05-12 23:08:111280 days ago1620860891
0x7b706466...628b4cb25
0.1 ETH
124224332021-05-12 23:08:111280 days ago1620860891
0x7b706466...628b4cb25
0.01 ETH
124224282021-05-12 23:07:361280 days ago1620860856
0x7b706466...628b4cb25
0.01 ETH
124224282021-05-12 23:07:361280 days ago1620860856
0x7b706466...628b4cb25
0.01 ETH
124224112021-05-12 23:02:571280 days ago1620860577
0x7b706466...628b4cb25
0.01 ETH
124224112021-05-12 23:02:571280 days ago1620860577
0x7b706466...628b4cb25
0.01 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WethConverter

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2021-05-12
*/

// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2015, 2016, 2017 Dapphub
// Adapted by Ethereum Community 2021
pragma solidity 0.7.6;

interface WETH9Like {
    function withdraw(uint) external;
    function deposit() external payable;
    function transfer(address, uint) external returns (bool);
    function transferFrom(address, address, uint) external returns (bool);
}

interface WETH10Like {
    function depositTo(address) external payable;
    function withdrawFrom(address, address, uint256) external;
}

contract WethConverter {
    WETH9Like constant private weth9 = WETH9Like(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); // ETH wrapper contract v9
    WETH10Like constant private weth10 = WETH10Like(0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9F); // ETH wrapper contract v10
    
    receive() external payable {}

    function weth9ToWeth10(address account, uint256 value) external payable {
        weth9.transferFrom(account, address(this), value);
        weth9.withdraw(value);
        weth10.depositTo{value: value + msg.value}(account);
    }

    function weth10ToWeth9(address account, uint256 value) external payable {
        weth10.withdrawFrom(account, address(this), value);
        uint256 combined = value + msg.value;
        weth9.deposit{value: combined}();
        weth9.transfer(account, combined);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"weth10ToWeth9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"weth9ToWeth10","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506103cc806100206000396000f3fe60806040526004361061002d5760003560e01c80633a3ce88f14610039578063e0e240111461006757610034565b3661003457005b600080fd5b6100656004803603604081101561004f57600080fd5b506001600160a01b038135169060200135610093565b005b6100656004803603604081101561007d57600080fd5b506001600160a01b038135169060200135610215565b604080516323b872dd60e01b81526001600160a01b038416600482015230602482015260448101839052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916323b872dd9160648083019260209291908290030181600087803b1580156100fc57600080fd5b505af1158015610110573d6000803e3d6000fd5b505050506040513d602081101561012657600080fd5b505060408051632e1a7d4d60e01b815260048101839052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291632e1a7d4d91602480830192600092919082900301818387803b15801561017b57600080fd5b505af115801561018f573d6000803e3d6000fd5b5050505073f4bb2e28688e89fcce3c0580d37d36a7672e8a9f6001600160a01b031663b760faf9348301846040518363ffffffff1660e01b815260040180826001600160a01b031681526020019150506000604051808303818588803b1580156101f857600080fd5b505af115801561020c573d6000803e3d6000fd5b50505050505050565b60408051634aaad4a160e11b81526001600160a01b038416600482015230602482015260448101839052905173f4bb2e28688e89fcce3c0580d37d36a7672e8a9f91639555a94291606480830192600092919082900301818387803b15801561027d57600080fd5b505af1158015610291573d6000803e3d6000fd5b505050506000348201905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102eb57600080fd5b505af11580156102ff573d6000803e3d6000fd5b50506040805163a9059cbb60e01b81526001600160a01b038816600482015260248101869052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2945063a9059cbb9350604480830193506020928290030181600087803b15801561036557600080fd5b505af1158015610379573d6000803e3d6000fd5b505050506040513d602081101561038f57600080fd5b505050505056fea2646970667358221220ed1627289bf6f4e7f31c90bafea22db950eeecbe1070afdaf9d4aefade6b937f64736f6c63430007060033

Deployed Bytecode

0x60806040526004361061002d5760003560e01c80633a3ce88f14610039578063e0e240111461006757610034565b3661003457005b600080fd5b6100656004803603604081101561004f57600080fd5b506001600160a01b038135169060200135610093565b005b6100656004803603604081101561007d57600080fd5b506001600160a01b038135169060200135610215565b604080516323b872dd60e01b81526001600160a01b038416600482015230602482015260448101839052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916323b872dd9160648083019260209291908290030181600087803b1580156100fc57600080fd5b505af1158015610110573d6000803e3d6000fd5b505050506040513d602081101561012657600080fd5b505060408051632e1a7d4d60e01b815260048101839052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291632e1a7d4d91602480830192600092919082900301818387803b15801561017b57600080fd5b505af115801561018f573d6000803e3d6000fd5b5050505073f4bb2e28688e89fcce3c0580d37d36a7672e8a9f6001600160a01b031663b760faf9348301846040518363ffffffff1660e01b815260040180826001600160a01b031681526020019150506000604051808303818588803b1580156101f857600080fd5b505af115801561020c573d6000803e3d6000fd5b50505050505050565b60408051634aaad4a160e11b81526001600160a01b038416600482015230602482015260448101839052905173f4bb2e28688e89fcce3c0580d37d36a7672e8a9f91639555a94291606480830192600092919082900301818387803b15801561027d57600080fd5b505af1158015610291573d6000803e3d6000fd5b505050506000348201905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102eb57600080fd5b505af11580156102ff573d6000803e3d6000fd5b50506040805163a9059cbb60e01b81526001600160a01b038816600482015260248101869052905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2945063a9059cbb9350604480830193506020928290030181600087803b15801561036557600080fd5b505af1158015610379573d6000803e3d6000fd5b505050506040513d602081101561038f57600080fd5b505050505056fea2646970667358221220ed1627289bf6f4e7f31c90bafea22db950eeecbe1070afdaf9d4aefade6b937f64736f6c63430007060033

Deployed Bytecode Sourcemap

546:841:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;867:234;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;867:234:0;;;;;;;;:::i;:::-;;1109:275;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1109:275:0;;;;;;;;:::i;867:234::-;950:49;;;-1:-1:-1;;;950:49:0;;-1:-1:-1;;;;;950:49:0;;;;;;986:4;950:49;;;;;;;;;;;;621:42;;950:18;;:49;;;;;;;;;;;;;;-1:-1:-1;621:42:0;950:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1010:21:0;;;-1:-1:-1;;;1010:21:0;;;;;;;;;;621:42;;1010:14;;:21;;;;;-1:-1:-1;;1010:21:0;;;;;;;-1:-1:-1;621:42:0;1010:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;746:42;-1:-1:-1;;;;;1042:16:0;;1074:9;1066:5;:17;1085:7;1042:51;;;;;;;;;;;;;-1:-1:-1;;;;;1042:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;867:234;;:::o;1109:275::-;1192:50;;;-1:-1:-1;;;1192:50:0;;-1:-1:-1;;;;;1192:50:0;;;;;;1229:4;1192:50;;;;;;;;;;;;746:42;;1192:19;;:50;;;;;-1:-1:-1;;1192:50:0;;;;;;;-1:-1:-1;746:42:0;1192:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1253:16;1280:9;1272:5;:17;1253:36;;621:42;-1:-1:-1;;;;;1300:13:0;;1321:8;1300:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1343:33:0;;;-1:-1:-1;;;1343:33:0;;-1:-1:-1;;;;;1343:33:0;;;;;;;;;;;;;;621:42;;-1:-1:-1;1343:14:0;;-1:-1:-1;1343:33:0;;;;;-1:-1:-1;1343:33:0;;;;;;;-1:-1:-1;621:42:0;1343:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1109:275:0:o

Swarm Source

ipfs://ed1627289bf6f4e7f31c90bafea22db950eeecbe1070afdaf9d4aefade6b937f

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.