Skip to content
Verified contractPartial

UserWallet

Address0xb2a53a4e905a9be834266f23ed447e94b213e533
Balance

0.011041 ETH

 

Transactions

114

 

Compiler

solc 0.3.2

 

Same code

3,220 more contracts

 

Details

Compiler
solc 0.3.2+commit.81ae2a78
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
1,505,192
Creation transaction
0x781ad2f180…c2573c0ae9

UserWallet.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Bank {
    function deposit(uint userId) returns (bool);
    function depositForSender(uint userId, uint data, address sender) returns (uint);
}

contract UserWallet {
    uint public userId;
    Bank public bank;

    event Deposit(address from, uint value);

    function UserWallet(address _bank, uint _userId) {
        userId = _userId;
        bank = Bank(_bank);
    }

    function() {
        if (msg.gas > 50000) {
            if (!bank.deposit.value(msg.value)(userId)) Deposit(tx.origin, msg.value);
        } else {
            Deposit(tx.origin, msg.value);
        }
    }

    function toBank(uint amount, uint data, address sender) returns (uint) {
        if (msg.sender != address(bank) || amount < 0 || data < 0 || amount > this.balance) return 0;
        if (amount == 0) amount = this.balance;
        return bank.depositForSender.value(amount)(userId, data, sender);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.