ETH Price: $2,509.63 (+0.73%)

Contract

0x89dfE305C0080970Cc5e0212e2C8C93114f83b88
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Flush138869872021-12-27 11:18:461036 days ago1640603926IN
0x89dfE305...114f83b88
0 ETH0.0013876842.61945449
Transfer134407172021-10-18 8:22:531106 days ago1634545373IN
0x89dfE305...114f83b88
0.03 ETH0.00205898

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
138869872021-12-27 11:18:461036 days ago1640603926
0x89dfE305...114f83b88
0.03 ETH
138869832021-12-27 11:18:181036 days ago1640603898  Contract Creation0 ETH
Loading...
Loading

Minimal Proxy Contract for 0x8adb2ddad0d11c6bacec8dcd4ef45c0e5359bbec

Contract Name:
Forwarder

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-10-03
*/

// SPDX-License-Identifier: MIT
pragma solidity >0.8.0 <0.9.0;

contract Forwarder {

    address payable immutable public destinationAddress;
    event Created(bytes32 salt, address indexed forwarder);
    event Forwarded(address addr, uint256 quantity);

    constructor(address payable destination) {
        destinationAddress = destination;
        destination.transfer(address(this).balance);
        emit Forwarded(address(this), address(this).balance);
    }

    // EIP-1167
    function derivate(bytes32 salt) external returns (address result) {
        bytes20 targetBytes = bytes20(address(this));
        assembly {
            let bs := mload(0x40)
            mstore(bs, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(bs, 0x14), targetBytes)
            mstore(add(bs, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)

            let encoded_data := add(0x20, bs) // load initialization code.
            let encoded_size := mload(bs)     // load the init code's length.

            result := create2(0, bs, 0x37, salt)
        }

        emit Created(salt, result);
    }

    // Auto forward all incoming ethers
    receive() external payable {
        flush();
    }

    // Manually require to forward ethers when the forwarder has been derivated after assets have been received on the contract address
    function flush() public {
        // destinationAddress.transfer(address(this).balance);
        destinationAddress.call{value: address(this).balance}("");
        emit Forwarded(address(this), address(this).balance);
    }

    // Forward ERC20 tokens from a given contract address
    function flushTokens(address tokenContractAddress) public {
        ERC20Interface instance = ERC20Interface(tokenContractAddress);
        uint256 forwarderBalance = instance.balanceOf(address(this));
        if (forwarderBalance == 0) {
            return;
        }

        instance.transfer(destinationAddress, forwarderBalance);
        emit Forwarded(tokenContractAddress, forwarderBalance);
    }

    // Forward only a given quantity of ERC20 tokens from a the provided contract address 
    function flushTokensQuantity(address tokenContractAddress, uint256 quantity) public {
        ERC20Interface instance = ERC20Interface(tokenContractAddress);
        instance.transfer(destinationAddress, quantity);
        emit Forwarded(tokenContractAddress, quantity);
    }

    // Forward all ethers present on this contract and all ERC20 tokens from a given contract address
    function flushTokensAndBalance(address tokenContractAddress) public {
        flush();
        flushTokens(tokenContractAddress);
    }

    function requireCall(address dest, bytes memory data) public returns (bool, bytes memory) {
        require(msg.sender == destinationAddress);
        return dest.call(data);
    }
}

interface ERC20Interface {
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
}

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"destination","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":true,"internalType":"address","name":"forwarder","type":"address"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Forwarded","type":"event"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"derivate","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"destinationAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flush","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContractAddress","type":"address"}],"name":"flushTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContractAddress","type":"address"}],"name":"flushTokensAndBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContractAddress","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"flushTokensQuantity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dest","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"requireCall","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

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.