Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract metaCoin {
- mapping (address => uint) public balances;
- function metaCoin() {
- balances[msg.sender] = 10000;
- }
- function sendToken(address receiver, uint amount) returns(bool successful){
- if (balances[msg.sender] < amount) return false;
- balances[msg.sender] -= amount;
- balances[receiver] += amount;
- return false;
- }
- }
- contract coinCaller{
- metaCoin m;
- function sendCoin(address coinContractAddress, address receiver, uint amount){
- m = metaCoin(coinContractAddress);
- m.sendToken(receiver, amount);
- }
- }
Add Comment
Please, Sign In to add comment