Skip to content

Instantly share code, notes, and snippets.

@BeautifoolData
Last active June 2, 2024 03:16
Show Gist options
  • Save BeautifoolData/f127f173d359393bba0b1a444f07c205 to your computer and use it in GitHub Desktop.
Save BeautifoolData/f127f173d359393bba0b1a444f07c205 to your computer and use it in GitHub Desktop.
bitcoin btc on ethereum 2015 source code...
contract myToken {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
/* This creates an array with all balances */
mapping (address => uint) public balanceOf;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
/* Initializes contract with initial supply tokens to the creator of the contract */
function myToken(uint256 _supply, string _name, uint8 _decimals, string _symbol) {
/* if supply not given then generate 1 million of the smallest unit of the token */
if (_supply == 0) _supply = 2100000000000000;
/* Unless you add other functions these variables will never change */
balanceOf[msg.sender] = _supply;
name = "bitcoin";
symbol = "btc";
/* If you want a divisible token then add the amount of decimals the base unit has */
decimals = 8;
}
/* Send coins */
function transfer(address _to, uint256 _value) returns(bool success) {
/* if the sender doenst have enough balance then stop */
if (balanceOf[msg.sender] < _value) throw;
/* Add and subtract new balances */
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
/* Notifiy anyone listening that this transfer took place */
Transfer(msg.sender, _to, _value);
}
}
compiler: 0.1.7
enable optimization: 200
_supply: 0
_name:
_decimals: 0
_symbol:
Resulting call data:
0x606060405260405161041f38038061041f83398101604052805160805160a05160c051929391820192909101836000141561003f57660775f05a07400093505b33600160a060020a031660009081526003602090815260408083208790558051808201909152600781527f626974636f696e000000000000000000000000000000000000000000000000009082019081528254838052905160ff1916600e1783556100f89160026001831615610100026000190190921691909104601f01047f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563908101905b8082111561018a57600081556001016100e4565b505060408051808201909152600381527f62746300000000000000000000000000000000000000000000000000000000006020918201908152600180546000829052915160ff191660061781559161018e91600281851615610100026000190190911604601f01047fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6908101906100e4565b5090565b50506002805460ff1916600817905550505050610270806101af6000396000f3606060405260e060020a600035046306fdde038114610047578063313ce567146100a457806370a08231146100b057806395d89b41146100c8578063a9059cbb14610123575b005b61015f60008054602060026001831615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156102025780601f106101d757610100808354040283529160200191610202565b6101cd60025460ff1681565b6101cd60043560036020526000908152604090205481565b61015f600180546020601f6002600019610100858716150201909316929092049182018190040260809081016040526060828152929190828280156102025780601f106101d757610100808354040283529160200191610202565b6101cd60043560243573ffffffffffffffffffffffffffffffffffffffff33166000908152600360205260408120548290101561020a57610002565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156101bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6060908152602090f35b820191906000526020600020905b8154815290600101906020018083116101e557829003601f168201915b505050505081565b60408082208054849003905573ffffffffffffffffffffffffffffffffffffffff808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a3929150505600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(original contract deployment call data)
0x606060405260405161041f38038061041f83398101604052805160805160a05160c051929391820192909101836000141561003f57660775f05a07400093505b33600160a060020a031660009081526003602090815260408083208790558051808201909152600781527f626974636f696e000000000000000000000000000000000000000000000000009082019081528254838052905160ff1916600e1783556100f89160026001831615610100026000190190921691909104601f01047f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563908101905b8082111561018a57600081556001016100e4565b505060408051808201909152600381527f62746300000000000000000000000000000000000000000000000000000000006020918201908152600180546000829052915160ff191660061781559161018e91600281851615610100026000190190911604601f01047fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6908101906100e4565b5090565b50506002805460ff1916600817905550505050610270806101af6000396000f3606060405260e060020a600035046306fdde038114610047578063313ce567146100a457806370a08231146100b057806395d89b41146100c8578063a9059cbb14610123575b005b61015f60008054602060026001831615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156102025780601f106101d757610100808354040283529160200191610202565b6101cd60025460ff1681565b6101cd60043560036020526000908152604090205481565b61015f600180546020601f6002600019610100858716150201909316929092049182018190040260809081016040526060828152929190828280156102025780601f106101d757610100808354040283529160200191610202565b6101cd60043560243573ffffffffffffffffffffffffffffffffffffffff33166000908152600360205260408120548290101561020a57610002565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156101bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6060908152602090f35b820191906000526020600020905b8154815290600101906020018083116101e557829003601f168201915b505050505081565b60408082208054849003905573ffffffffffffffffffffffffffffffffffffffff808516808452918320805485019055606084815233909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602090a3929150505600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
100% match?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment