This file contains hidden or 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; | |
// https://medium.com/coinmonks/create-your-own-cryptocurrency-in-ethereum-blockchain-40865db8a29f | |
contract owned { | |
address public owner; | |
constructor() public { | |
owner = msg.sender; | |
} | |
This file contains hidden or 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; | |
// https://medium.com/coinmonks/create-your-own-cryptocurrency-in-ethereum-blockchain-40865db8a29f | |
contract owned { | |
address public owner; | |
constructor() public { | |
owner = msg.sender; | |
} | |
This file contains hidden or 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 owned { | |
address public owner; | |
constructor() public { | |
owner = msg.sender; | |
} | |
modifier onlyOwner { |
This file contains hidden or 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; | |
interface ERC20 { | |
function totalSupply() public view returns (uint256 totalSupply); //[Get the total token supply] | |
function balanceOf(address _owner) public view returns (uint256 balance); //[Get the account balance of another account with address _owner] | |
function transfer(address _to, uint256 _value) public returns (bool success); //[Send _value amount of tokens to address _to] | |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); //[Send _value amount of tokens from address _from to address _to] | |
function approve(address _spender, uint256 _value) public returns (bool success); //[Allow _spender to withdraw from your account, multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value] | |
function allowance(address _owner, address _spender) public view returns (uint256 remaining); //[Returns the amount which _spender is still allowed to withdraw from _owner] | |
This file contains hidden or 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; | |
interface ERC20 { | |
function totalSupply() public view returns (uint256 totalSupply); //[Get the total token supply] | |
function balanceOf(address _owner) public view returns (uint256 balance); //[Get the account balance of another account with address _owner] | |
function transfer(address _to, uint256 _value) public returns (bool success); //[Send _value amount of tokens to address _to] | |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); //[Send _value amount of tokens from address _from to address _to] | |
function approve(address _spender, uint256 _value) public returns (bool success); //[Allow _spender to withdraw from your account, multiple times, up to the _value amount. If this function is called again it overwrites the current allowance with _value] | |
function allowance(address _owner, address _spender) public view returns (uint256 remaining); //[Returns the amount which _spender is still allowed to withdraw from _owner] | |
This file contains hidden or 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 Ballot { | |
struct Voter { | |
uint weight; | |
bool voted; | |
uint8 vote; | |
address delegate; | |
} | |
struct Proposal { |
This file contains hidden or 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 Ballot { | |
struct Voter { | |
uint weight; | |
bool voted; | |
uint8 vote; | |
address delegate; | |
} | |
struct Proposal { |
This file contains hidden or 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 DataType { | |
bool myBool = false; | |
int8 myInt = -128; | |
uint8 myUint = 255; | |
string myString; | |
uint8[] myStringArr; |
This file contains hidden or 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 DataType { | |
bool myBool = false; | |
int8 myInt = -128; | |
uint8 myUint = 255; | |
string myString; | |
uint8[] myStringArr; |
This file contains hidden or 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 DataType { | |
bool myBool = false; | |
int8 myInt = -128; | |
uint8 myUint = 255; | |
string myString; | |
uint8[] myStringArr; |
NewerOlder