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.23; | |
/** | |
* @dev Extended library for address array | |
*/ | |
library AddressArrayExtended { | |
/** | |
* @dev Removes the address *value* from the list of _self[] | |
* @notice Returns false if value is not found |
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.23; | |
// Make this a library | |
contract AdrressArray { | |
address[] private m_array; | |
constructor(address[] array) public payable | |
{ | |
m_array = array; |
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.10; | |
contract MultipleReturn { | |
function returnFirstValue(uint a, uint b) public pure returns (uint) { | |
return a; | |
} | |
function caller() public pure returns (uint) { | |
return returnFirstValue({a: 5, b: 10}); | |
} |
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.10; | |
contract MultipleReturn { | |
function returnFirstValue(uint a, uint b) public pure returns (uint) { | |
return a; | |
} | |
function caller() public pure returns (uint) { | |
return returnFirstValue({a: 5, b: 10}); | |
} |
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 Letter { | |
function n() external returns (uint); | |
} | |
contract A is Letter { | |
function n() public returns (uint) { | |
return 1; |
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 Letter { | |
function n() external returns (uint); | |
} | |
contract A is Letter { | |
function n() public returns (uint) { | |
return 1; |
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.23; | |
contract TimeBasedWill { | |
address private _beneficiaries; | |
uint private _startTime; | |
uint private _expiryTime; | |
address private 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 EtherTransferTo { | |
// fallback function no argument no return value | |
function() public payable { | |
} | |
function getBalance() public view returns (uint) { | |
return address(this).balance; | |
} |
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 EtherTransferTo { | |
// fallback function no argument no return value | |
function() public payable { | |
} | |
function getBalance() public view returns (uint) { | |
return address(this).balance; | |
} |
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 transferFrom(address _from, address _to, uint _value) public returns (bool); | |
function approve(address _spender, uint _value) public returns (bool); | |
function allowance(address _owner, address _spender) public constant returns (uint); | |
event Approval(address indexed _owner, address indexed _spender, uint _value); | |
} |
NewerOlder