Skip to content
Verified contractPartial

Relay

Address0xd6ccd356cf3e0a3e90efe59d7051578504855df0
Balance

0 ETH

 

Transactions

26

 

Compiler

solc 0.2.1

 

Same code

Only this contract

 

Details

Compiler
solc 0.2.1+commit.91a6b35f
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
766,013
Creation transaction
0x70e0b1a051…18e84c3231

Relay.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Relay {
    address target;

    function() {
        forward(msg.gas, tx.origin, target, msg.data);
    }

    function forward(uint startGas, address origin, address dest, bytes data) internal {
        uint refund;
        if (data.length > 0) {
            if (!dest.call.gas(msg.gas - 10000)(data)) startGas -= 128;
            refund = (startGas - msg.gas + uint(30000)) * tx.gasprice;
            if (refund > this.balance) refund = this.balance;
            if (refund > 0) origin.send(refund);
        }
    }

    function setTarget(address t) {
        target = t;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.