-
-
Save RaghavSood/a1c27edaf189576174f8718085a13697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
contract MyToken { | |
mapping(address => uint256) public balances; | |
uint256 public totalSupply_; | |
constructor (address addr) public { | |
totalSupply_= 10000; | |
balances[addr] = totalSupply_; | |
} | |
function transfer(address _to, uint256 _value) public { | |
require(_value <= balances[msg.sender]); | |
} | |
} | |
contract D { | |
function doTransfer(address newTokenHolder, MyToken erc20Toekn) external { | |
erc20Toekn.transfer(newTokenHolder, 20); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment