Contract 0x8e93e70d8ac18dbaa38dd557acd4901f843e04e3

Balance:0 ETH
Name:StromkontoProxy

Recent Activity

HashBlockTypeFromToAmount
0xe713d260...489586 call0xaa44ad5b45405581d2674b0f90efd839ce0d9af2 SC Stromkonto0 ETH
0x8b1ec192...489585 callRegistered Customer - x1T SC Stromkonto0 ETH
0x46dd794a...489578 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0x5b51c361...489455 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0x9ee3514a...489449 call0x2a410175bdece9b30550430ee1bc826310727de6 SC Stromkonto0 ETH
0xdbe0720c...489435 call0x90196dbffb3aa233849f9fc76911ced3ef3c452c SC Stromkonto0 ETH
0x3ac9f605...489433 call0x2f5a01875bbd9f0820b981cd8a43399c83e9755a SC Stromkonto0 ETH
0x74621a15...489431 call0xec03650f752faedaf2766583891eea949a2f997b SC Stromkonto0 ETH
0xdfaa2365...489419 call0xc207b38b2699d0b873dce0fb646d9aaab314d2a1 SC Stromkonto0 ETH
0xc3e3252f...489417 callRegistered Customer - x1T SC Stromkonto0 ETH
0x41b69068...489411 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x74b27bcd...489410 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xfabacdda...489407 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x5858bec2...489406 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x210ae7bd...489405 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x33a7e9d7...489402 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x36c362b2...489401 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xc190a1c6...489398 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x4e4e103d...489397 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x506f5a6c...489394 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x506730b3...489393 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x8ede745e...489391 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xa9d4aa22...489388 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xc9837265...489387 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x95ae8559...489386 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xab160dc5...489383 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x0d82c49f...489382 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x0ca638e3...489373 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xeee874b8...489369 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xc939de6d...489365 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x1d07f460...489361 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0x09f7ff15...489358 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x746ca3e0...489354 call0x2a410175bdece9b30550430ee1bc826310727de6 SC Stromkonto0 ETH
0xa2404849...489353 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xaf0bd192...489343 call0x6b83a987dd7c5cd535ce931754292bd662431564 SC Stromkonto0 ETH
0x262266da...489342 call0x1544dea04cfed0db6199c2f8392c1f1727c69d49 SC Stromkonto0 ETH
0xf125a994...489341 call0xe8367592e3dbb7a2f3df16ba9aa0906a8d447931 SC Stromkonto0 ETH
0x53b094dc...489339 call0x8910fd705b5d3f477057588b6c5e1c985b1d086e SC Stromkonto0 ETH
0x5ac80024...489338 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xeffe4d3e...489338 call0x94f6f70d7949099ef668ba31a28e3e3b413fef33 SC Stromkonto0 ETH
0xc10566db...489334 call0x90196dbffb3aa233849f9fc76911ced3ef3c452c SC Stromkonto0 ETH
0x28d75caf...489333 call0x2f5a01875bbd9f0820b981cd8a43399c83e9755a SC Stromkonto0 ETH
0xd6f35990...489331 call0xec03650f752faedaf2766583891eea949a2f997b SC Stromkonto0 ETH
0x2252f1ed...489320 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x1c73ca59...489319 call0x03b972b77d2d78f2b1da38e51951b26bd62cba7a SC Stromkonto0 ETH
0x137ed8d3...489316 call0xc207b38b2699d0b873dce0fb646d9aaab314d2a1 SC Stromkonto0 ETH
0xdf121b46...489315 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x617222c9...489310 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x4f669cf7...489306 call0xaa44ad5b45405581d2674b0f90efd839ce0d9af2 SC Stromkonto0 ETH
0x3e9ab79f...489304 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xd5b3c9d4...489303 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xd09bd02c...489300 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xd9de8222...489299 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xc1d61eb8...489296 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xcbaa098b...489295 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x6d39d374...489294 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x0356d0c8...489291 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xf2a9f23f...489290 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x39216c79...489287 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x34acd242...489286 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x131a38b0...489283 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x6ade7a4b...489282 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xa3054d65...489281 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x5770292e...489279 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x1a06c5ed...489277 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x7f74d9f4...489261 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x211308b9...489258 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0x4a56c08c...489257 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xa5e6be08...489252 call0x2a410175bdece9b30550430ee1bc826310727de6 SC Stromkonto0 ETH
0xc445ec26...489251 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x4ae09393...489232 call0x90196dbffb3aa233849f9fc76911ced3ef3c452c SC Stromkonto0 ETH
0x7bd958d5...489231 call0x2f5a01875bbd9f0820b981cd8a43399c83e9755a SC Stromkonto0 ETH
0x2202775c...489230 call0xec03650f752faedaf2766583891eea949a2f997b SC Stromkonto0 ETH
0x82fc5a6c...489227 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xf8b6c0fc...489223 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x0b82a07a...489221 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xac918db5...489214 call0xc207b38b2699d0b873dce0fb646d9aaab314d2a1 SC Stromkonto0 ETH
0xe8dcddbb...489205 call0xaa44ad5b45405581d2674b0f90efd839ce0d9af2 SC Stromkonto0 ETH
0x4956b447...489204 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xe6e14c48...489203 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xd2bf1ad9...489202 call0x55feca15fd2ad675f39938f39987582275763bd6 SC Stromkonto0 ETH
0xeac40fcb...489199 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x26e618f3...489198 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xc90cb7c7...489195 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x3834dbe8...489194 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x8c1eabf9...489193 call0x00650f311bf84f0cbfb850daf0adc4bdd119a0ad SC Stromkonto0 ETH
0xdba686ff...489192 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x698ff43f...489191 call0xaa44ad5b45405581d2674b0f90efd839ce0d9af2 SC Stromkonto0 ETH
0xa252dc5e...489190 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0x3a58d167...489189 call0x8fe78b5e804f8968116dd2891cadceb43fef5843 SC Stromkonto0 ETH
0xfe2b3aa2...489188 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x97a89c39...489187 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x9c643175...489184 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xb4527963...489183 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xbe6f0e83...489180 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x6005f5bb...489179 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x67ce7bf8...489178 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xdb3444b0...489175 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0x346d5b93...489174 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xd8b244c7...489160 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH
0xebcec0f3...489156 call0xec9d76432ee3d8155f383232835a9a4a443c7b47 SC Stromkonto0 ETH

Code

0x6080604052600436106100f5577c01000000000000000000000000000000000000000000000000000000006000350463184f609381146100fa5780631c2ad7061461013f578063546e428c14610172578063700f55b2146101af57806381ae00a0146101f85780638da5cb5b1461022b578063a2c70c0f1461025c578063a9059cbb14610271578063afd25e7b146102be578063beb2b55d146102f1578063c70515ff14610324578063cc7fc81014610339578063ceae34241461036c578063d7871faa1461039f578063dc43e6f1146103d2578063f2fde38b146103e7578063f4e952791461041a578063fadbcf481461042f575b600080fd5b34801561010657600080fd5b5061012d6004803603602081101561011d57600080fd5b5035600160a060020a0316610462565b60408051918252519081900360200190f35b34801561014b57600080fd5b5061012d6004803603602081101561016257600080fd5b5035600160a060020a0316610474565b34801561017e57600080fd5b506101ad6004803603604081101561019557600080fd5b50600160a060020a0381351690602001351515610486565b005b3480156101bb57600080fd5b506101ad600480360360808110156101d257600080fd5b50600160a060020a038135811691602081013590911690604081013590606001356104c8565b34801561020457600080fd5b506101ad6004803603602081101561021b57600080fd5b5035600160a060020a03166105b6565b34801561023757600080fd5b50610240610603565b60408051600160a060020a039092168252519081900360200190f35b34801561026857600080fd5b50610240610612565b34801561027d57600080fd5b506102aa6004803603604081101561029457600080fd5b50600160a060020a038135169060200135610621565b604080519115158252519081900360200190f35b3480156102ca57600080fd5b5061012d600480360360208110156102e157600080fd5b5035600160a060020a0316610629565b3480156102fd57600080fd5b5061012d6004803603602081101561031457600080fd5b5035600160a060020a031661063b565b34801561033057600080fd5b50610240610656565b34801561034557600080fd5b506101ad6004803603602081101561035c57600080fd5b5035600160a060020a0316610665565b34801561037857600080fd5b5061012d6004803603602081101561038f57600080fd5b5035600160a060020a03166106b3565b3480156103ab57600080fd5b5061012d600480360360208110156103c257600080fd5b5035600160a060020a03166106ce565b3480156103de57600080fd5b5061012d6106e0565b3480156103f357600080fd5b506101ad6004803603602081101561040a57600080fd5b5035600160a060020a03166106e6565b34801561042657600080fd5b5061012d610774565b34801561043b57600080fd5b506102aa6004803603602081101561045257600080fd5b5035600160a060020a031661077a565b60046020526000908152604090205481565b60016020526000908152604090205481565b600054600160a060020a0316331461049d57600080fd5b600160a060020a03919091166000908152600760205260409020805460ff1916911515919091179055565b3360009081526007602052604090205460ff16156105b057600160a060020a03808516600081815260026020818152604080842080548901815560048352818520805489019055958916808552600180845282862080548b0181556003855283872080548b0190558787529754818552838720548388529585529583902054908452965482519687529286015284810188905260608501879052608085019390935260a084019190915260c083019390935260e082019290925290517f1a71774309711c9c0f58692353c6a0789dbdc71f63e2e42a190ab9bc03f79250918190036101000190a15b50505050565b3360009081526007602052604090205460ff1615156001146105d757610600565b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600054600160a060020a031681565b600954600160a060020a031681565b600092915050565b60036020526000908152604090205481565b600160a060020a031660009081526001602052604090205490565b600854600160a060020a031681565b3360009081526007602052604090205460ff16151560011461068657610600565b60088054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600160a060020a031660009081526002602052604090205490565b60026020526000908152604090205481565b60065481565b600054600160a060020a031633146106fd57600080fd5b60005460408051600160a060020a039283168152918316602083015280517ffde8e7d7be5607c2e5922b2a6fdb6106620225daaea86b34e0335c1b673467cc9281900390910190a16000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b60076020526000908152604090205460ff168156fea165627a7a72305820aadd9c56c9b381d7f5e6e17af052a46e0dc22d1f63c0bd0d36f9aedea1d091fc0029

Source

pragma solidity ^0.5.0;
/**
 * StromDAO Business Objects
 * ====================================================================
 * Upper level business objects required for power delivery on a public
 * energy distribution system. Defines PowerDelivery as digital asset
 * used for transaction data and entities (roles) for master data.
 * 
 * @author Thorsten Zoerner <thorsten.zoerner(at)stromdao.de)
 **/


contract owned {
	address public owner;
	event Transfered(address old_owner,address new_owner);
	constructor() public {
		owner = msg.sender;
	}

	modifier onlyOwner {
		if (msg.sender != owner) revert();
		_;
	}
	
	modifier onlyOwnerAsOriginator {
		if (tx.origin != owner) revert();
		_;
	}
	
	function transferOwnership(address newOwner) public onlyOwner {
		emit Transfered(owner,newOwner);
		owner = newOwner;
	}
}

contract StringStorage {
	string public str;
	
	constructor(string memory _str) public {
		str=_str;
	}
}

contract StringStorageBuilder {
	event Built(address _stringStorage);
	
	function build(string memory _str) public returns(address) {
			StringStorage ss = new StringStorage(_str);
			emit Built(address(ss));
			return address(ss);
	}
}


contract DeliveryReceiver is owned {
	RoleLookup public roles;
	DeliveryReceiver public nextReceiver;
	mapping(address=>bool) public monitored;
	
	event Process(address sender,address account,uint256 startTime,uint256 endTime,uint256 power);
	
	constructor(RoleLookup _roles) public {
		roles=_roles;
	}
	

	
	function  monitor(address _account,bool _monitor) internal {
		monitored[_account]=_monitor;    
	}
	function setNextReceiver(DeliveryReceiver _next) onlyOwner public {
		nextReceiver=_next;
	}
}

/**
 * RoleLookup
 * 
 * ====================================================================
 * Provides entity relation model (yellowpages, who-implements-what)
 * to StromDAO Business Objects. A single consensframe must always share
 * a single RoleLookup deployment.
 */
contract RoleLookup {
	mapping(uint256 => uint8) public roles;
	mapping(address=>mapping(uint8=>address)) public relations;
	 mapping(address=>mapping(address=>uint8)) public relationsFrom;
	mapping(uint8=>address) public defaults;
	event Relation(address _from,uint8 _for, address _to);
	
	constructor() public {
		roles[0]= 0;
		roles[1]= 1;
		roles[2]= 2;
		roles[3]= 3;
		roles[4]= 4;
		roles[5]= 5;
	}
	function setDefault(uint8 _role,address _from) public {
		if(msg.sender!=address(0xD87064f2CA9bb2eC333D4A0B02011Afdf39C4fB0)) revert();
		defaults[_role]=_from;
	}
	function setRelation(uint8 _for,address _from) public {
		relations[msg.sender][_for]=_from;
		emit Relation(_from,_for,msg.sender);
	}
	function setRelationFrom(uint8 _for,address _from)  public {
		relationsFrom[msg.sender][_from]=_for;
		emit Relation(_from,_for,msg.sender);
	}
}


contract TxHandler is owned  {
	
	  function addTx(address _from,address _to, uint256 _value,uint256 _base) public onlyOwner {
	  }
	
}

contract Stromkonto is TxHandler {
 
	event Transfer(address indexed _from, address indexed _to, uint256 _value);
	event Tx(address _from,address _to, uint256 _value,uint256 _base,uint256 _from_soll,uint256 _from_haben,uint256 _to_soll,uint256 _to_haben);
	
	mapping (address => uint256) public balancesHaben;
	mapping (address => uint256) public balancesSoll;
	
	mapping (address => uint256) public baseHaben;
	mapping (address => uint256) public baseSoll;
	uint256 public sumTx;
	uint256 public sumBase;
	
	function transfer(address _to, uint256 _value) public returns (bool success) { return false; revert();}
	

	function balanceHaben(address _owner) public returns (uint256 balance) {
		return balancesHaben[_owner];
	}
	
	function balanceSoll(address _owner) public returns (uint256 balance) {
		return balancesSoll[_owner];
	}

	
	function addTx(address _from,address _to, uint256 _value,uint256 _base) public  onlyOwner {
		balancesSoll[_from]+=_value;
		baseSoll[_from]+=_base;
		balancesHaben[_to]+=_value;
		baseHaben[_to]+=_base;
		sumTx+=_value;
		sumBase+=_base;
		emit Tx(_from,_to,_value,_base,balancesSoll[_from],balancesHaben[_from],balancesSoll[_to],balancesHaben[_to]);
	}
	
}

contract Transferable is Stromkonto {
	event Tx(address _from,address _to, uint256 _value,uint256 _base,uint256 _from_soll,uint256 _from_haben,uint256 _to_soll,uint256 _to_haben);
	event Receipt(address _from,address _to,address _msg, uint256 _value,uint256 _base,bool _is_liability);
	
	function addRx(address _to,address _msg, uint256 _value,uint256 _base,bool _is_liability) public   {
		if(_is_liability) {
			balancesSoll[_to]+=_value;
			baseSoll[_to]+=_base;
			balancesHaben[msg.sender]+=_value;
			baseHaben[msg.sender]+=_base;
			emit Tx(_to,msg.sender,_value,_base,balancesSoll[_to],balancesHaben[_to],balancesSoll[msg.sender],balancesHaben[msg.sender]);
		} else {
			balancesSoll[msg.sender]+=_value;
			baseSoll[msg.sender]+=_base;
			balancesHaben[_to]+=_value;
			baseHaben[_to]+=_base;
			emit Tx(msg.sender,_to,_value,_base,balancesSoll[msg.sender],balancesHaben[msg.sender],balancesSoll[_to],balancesHaben[_to]);
		}
		
		sumTx+=_value;
		sumBase+=_base;
		emit Receipt(msg.sender,_to,_msg,_value,_base,_is_liability);
	}
	
}


contract StromkontoProxy is Stromkonto {
		
		mapping(address=>bool) public allowedSenders;
		
		address public receipt_asset;
		address public receipt_liability;
		
		
		constructor() public {
				allowedSenders[msg.sender]=true;
		}
		function modifySender(address _who,bool _allow) public onlyOwner {
				//if(msg.sender!=address(0xD87064f2CA9bb2eC333D4A0B02011Afdf39C4fB0)) throw;
				allowedSenders[_who]=_allow;
		}
		
		function addTx(address _from,address _to, uint256 _value,uint256 _base) public  {
			if(allowedSenders[msg.sender]) {
				balancesSoll[_from]+=_value;
				baseSoll[_from]+=_base;
				balancesHaben[_to]+=_value;
				baseHaben[_to]+=_base;
				emit Tx(_from,_to,_value,_base,balancesSoll[_from],balancesHaben[_from],balancesSoll[_to],balancesHaben[_to]);
			}
		}
		
		function setReceiptAsset(address _address) public {
			if(allowedSenders[msg.sender]!=true) return; 
			receipt_asset=_address;
		}
		
		function setReceiptLiablity(address _address) public {
			if(allowedSenders[msg.sender]!=true) return; 
			receipt_liability=_address;
		}		
}
contract Billing {
	
	event Calculated(address from,address to,uint256 cost);
	address public from;
	address public to;
	uint256 public cost_per_day;
	uint256 public cost_per_energy;
	
	constructor(uint256 _cost_per_day,uint256 _cost_per_energy) public {
		cost_per_day=_cost_per_day;
		cost_per_energy=_cost_per_energy;
	}
	
	function becomeFrom() public {
		if(address(0)!=from) revert();
		from=msg.sender;
	}
	
	function becomeTo() public {
		if(address(0)!=to) revert();
		to=msg.sender;
	}
	

}

contract Connection {
	address public from;
	address public to;
	
	constructor(address _from,address _to) public {
			from=_from;
			to=_to;
	}	
}

contract PricingEnergy {
	uint256 public cost_per_energy;
	
	constructor(uint256 _cost_per_energy) public {			
			cost_per_energy=_cost_per_energy;
	}	
}

contract PricingDay {
	uint256 public cost_per_day;
	
	constructor(uint256 _cost_per_day) public {			
			cost_per_day=_cost_per_day;
	}	
}


contract TXCache is owned {
	
	struct TX {
			address from;
			address to;
			uint256 base;
			uint256 value;
	}
	
	event addedTx(address _from,address _to,uint256 _base,uint256 _value);
	
	TX[] public txs;
	
	function addTx(address _from,address _to,uint256 _base,uint256 _value) public onlyOwner {
			txs.push(TX(_from,_to,_base,_value));
			emit addedTx(_from,_to,_base,_value);
	}
	function length() public returns(uint256)  {
			return txs.length;
	}
	
	function from(uint i) public returns(address) {
			return txs[i].from;
	}
	function to(uint i) public returns(address) {
			return txs[i].to;
	}
	function base(uint i) public returns(uint256) {
			return txs[i].base;
	}
	function value(uint i) public returns(uint256) {
			return txs[i].value;
	}
}


ABI

Constructor

0x608060405234801561001057600080fd5b5060008054600160a060020a0319163390811782558152600760205260409020805460ff191660011790556107bb8061004a6000396000f3fe6080604052600436106100f5577c01000000000000000000000000000000000000000000000000000000006000350463184f609381146100fa5780631c2ad7061461013f578063546e428c14610172578063700f55b2146101af57806381ae00a0146101f85780638da5cb5b1461022b578063a2c70c0f1461025c578063a9059cbb14610271578063afd25e7b146102be578063beb2b55d146102f1578063c70515ff14610324578063cc7fc81014610339578063ceae34241461036c578063d7871faa1461039f578063dc43e6f1146103d2578063f2fde38b146103e7578063f4e952791461041a578063fadbcf481461042f575b600080fd5b34801561010657600080fd5b5061012d6004803603602081101561011d57600080fd5b5035600160a060020a0316610462565b60408051918252519081900360200190f35b34801561014b57600080fd5b5061012d6004803603602081101561016257600080fd5b5035600160a060020a0316610474565b34801561017e57600080fd5b506101ad6004803603604081101561019557600080fd5b50600160a060020a0381351690602001351515610486565b005b3480156101bb57600080fd5b506101ad600480360360808110156101d257600080fd5b50600160a060020a038135811691602081013590911690604081013590606001356104c8565b34801561020457600080fd5b506101ad6004803603602081101561021b57600080fd5b5035600160a060020a03166105b6565b34801561023757600080fd5b50610240610603565b60408051600160a060020a039092168252519081900360200190f35b34801561026857600080fd5b50610240610612565b34801561027d57600080fd5b506102aa6004803603604081101561029457600080fd5b50600160a060020a038135169060200135610621565b604080519115158252519081900360200190f35b3480156102ca57600080fd5b5061012d600480360360208110156102e157600080fd5b5035600160a060020a0316610629565b3480156102fd57600080fd5b5061012d6004803603602081101561031457600080fd5b5035600160a060020a031661063b565b34801561033057600080fd5b50610240610656565b34801561034557600080fd5b506101ad6004803603602081101561035c57600080fd5b5035600160a060020a0316610665565b34801561037857600080fd5b5061012d6004803603602081101561038f57600080fd5b5035600160a060020a03166106b3565b3480156103ab57600080fd5b5061012d600480360360208110156103c257600080fd5b5035600160a060020a03166106ce565b3480156103de57600080fd5b5061012d6106e0565b3480156103f357600080fd5b506101ad6004803603602081101561040a57600080fd5b5035600160a060020a03166106e6565b34801561042657600080fd5b5061012d610774565b34801561043b57600080fd5b506102aa6004803603602081101561045257600080fd5b5035600160a060020a031661077a565b60046020526000908152604090205481565b60016020526000908152604090205481565b600054600160a060020a0316331461049d57600080fd5b600160a060020a03919091166000908152600760205260409020805460ff1916911515919091179055565b3360009081526007602052604090205460ff16156105b057600160a060020a03808516600081815260026020818152604080842080548901815560048352818520805489019055958916808552600180845282862080548b0181556003855283872080548b0190558787529754818552838720548388529585529583902054908452965482519687529286015284810188905260608501879052608085019390935260a084019190915260c083019390935260e082019290925290517f1a71774309711c9c0f58692353c6a0789dbdc71f63e2e42a190ab9bc03f79250918190036101000190a15b50505050565b3360009081526007602052604090205460ff1615156001146105d757610600565b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600054600160a060020a031681565b600954600160a060020a031681565b600092915050565b60036020526000908152604090205481565b600160a060020a031660009081526001602052604090205490565b600854600160a060020a031681565b3360009081526007602052604090205460ff16151560011461068657610600565b60088054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600160a060020a031660009081526002602052604090205490565b60026020526000908152604090205481565b60065481565b600054600160a060020a031633146106fd57600080fd5b60005460408051600160a060020a039283168152918316602083015280517ffde8e7d7be5607c2e5922b2a6fdb6106620225daaea86b34e0335c1b673467cc9281900390910190a16000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60055481565b60076020526000908152604090205460ff168156fe

Current contract state

FunctionResult