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
contract ETHUSDHandler { | |
function pay(string _cid, | |
address _oracle, | |
address _buyer, // this is for the case that someone else pays on your behalf | |
address[] _beneficiaries, | |
uint256[] _amounts, | |
address[] _notifiers) public payable { | |
require(_beneficiaries.length == _amounts.length); |
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.19; | |
import "./utils/strings.sol"; // github.com/Arachnid/solidity-stringutils/strings.sol | |
contract Registry { | |
using strings for *; | |
event LogPublish(address issuer, address subject, bytes32 action, bytes32 contentType, string cid); | |
function publish(address[] _subjects, bytes32[] _actions, bytes32[] _contentTypes, string _cids) public { | |
require(_subjects.length == _actions.length && _actions.length == _contentTypes.length); |
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.10; | |
import "./ETHUSDHandler.sol"; | |
contract ETHUSDHandlerFactory { | |
mapping(address => address[]) public userToHandlers; | |
function createNewHandler ( | |
address _beneficiary, | |
uint256 _initialPriceInUSD, |
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
0x374Bd185Ee19fD9f8682Eb875E5D0546A8D58CdD |
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
Barclays Prague Comms: | |
-> Paste address and other things in the comments. |
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.4; | |
/* | |
This is for testing if a transaction would throw. | |
Contract calls rethrow when it encounters errors. | |
Raw calls do not. | |
You wrap your contract you want to test in a ThrowProxy. | |
You prime it by calling the fallback function. | |
Then executing it. |
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
Simon's peer: | |
enode://56d33cb7dcd7bcf147e18597ef6ea4270c2202bf3e63905ba9d95916c44ef0ac17a9dfae3afe2c38cb31967bbb813c48482e5294497ba6f7df20da09793ba49a@[::]:20010?discport=0 | |
Simon's IP: | |
172.31.97.127 | |
Together: | |
Do. admin.addPeer("enode://56d33cb7dcd7bcf147e18597ef6ea4270c2202bf3e63905ba9d95916c44ef0ac17a9dfae3afe2c38cb31967bbb813c48482e5294497ba6f7df20da09793ba49a@172.31.97.127:20010?discport=0") | |
Create Genesis Block using "sh createNewGenesisBlock.sh" | |
then run: |
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
contract Generic is owned { | |
function() { | |
if(functions[msg.sig] != 0x0) { | |
functions[msg.sig].callcode(msg.data); | |
} | |
} | |
function changeMapping(bytes4 _functionSignature, address _addrOfFunction) { | |
if(msg.sender == owner) { |
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
//Most, basic default, standardised Token contract. | |
//Based on standardised APIs & slightly extended. https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs | |
//adds AddressApproval & AddressApprovalOnce events | |
//approve & approveOnce works on premise that approved always takes precedence. | |
//adds unapprove to basic coin interface. | |
contract Coin { | |
function sendCoin(uint _value, address _to) returns (bool _success) {} | |
function sendCoinFrom(address _from, uint _value, address _to) returns (bool _success) {} | |
function coinBalance() constant returns (uint _r) {} |
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
contract Function_hook_example { | |
function Function_hook_example() { | |
owner = msg.sender; | |
} | |
modifier isOwner { | |
if (msg.sender == owner) { | |
_ | |
} |
NewerOlder