You are on page 1of 1

pragma solidity ^0.4.

0;

contract CustodialContract
{
address client;
bool _switch = false;

event UpdateStatus(string _msg);


event UserInfo(string _msg, address _user, uint _amount);

function CustodialContract()
{
client = msg.sender;
}

modifier ifClient()
{
if(msg.sender != client)
{
throw;
}
_;
}

function depositFunds() payable


{
UserInfo("User named :", msg.sender, msg.value);
UpdateStatus("User deposited value of ");
}
function witdrowFunds(uint amount) ifClient
{
if(client.send(amount))
{
_switch = true;
}
else
{
_switch = false;
}
}

function getFunds() constant returns(uint)


{
return this.balance;
}
}

You might also like