Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.0;
- // The Delphi Contract will be used by Ethereum Smart Contracts
- // interested in having a decentralized bridge network with the
- // Hyperledger Fabric Platform
- contract Delphi {
- // General info about a bounty hunter
- struct BountyInfo {
- // The amount of Eth the bounty hunter staked
- uint staking_amount;
- // The amount of Eth the bounty is for
- uint bounty_amount;
- // If the Bounty Hunter lies, we set that he/she is evil
- bool is_evil;
- // The Bounty Hunter's Eth Address
- address bounty_hunter_address;
- // Bounty Hunter Server's IP to authenticate on hyperledger
- string bounty_hunter_ip;
- // Bounty Hunter's private key to authenticate on hyperledger
- }
- // List of Bounty Delphi Servers
- BountyInfo[] public bounty_hunters;
- uint total_bounty_ammount;
- uint num_hunters;
- // Create the Ethereum smart contract for the Bounty Hunters
- function Delphi(uint _total_bounty_ammount, uint _num_hunters_requested) public {
- }
- // Called by Bounty Hunters when they wish to enter the Bounty
- // They pass their information so they can be authenticated on they Hyperledger
- // private chain
- function enterBounty(string ip, string public_key) public{
- }
- // Called by the Delphi Contract Creator when the Bounty period is over
- // all audited. Evil Bounty hunters will neither get their stake bad nor
- // receive bounty
- function completeBounty() public {
- }
- // Called by a Smart Contract Using Delphi to get Hyperledger Data
- // Data received is only that that has recieved consensus from a majority
- // of bounty hunters
- function getHyperledgerData(string data_name) public {
- }
- // Called by a Smart Contract Using Delphi wishing to submit Data to
- // Hyperledger. This gets transmitted by bounty hunters to Hyperledger
- // where it is collected so only a matching majority goes through
- function sendHyperledgerData(string data_name) public {
- }
- // Called by Bounty Hunters when they wish to submit Hyperledger Data
- // to Ethereum. This is compared with results of other Bounty Hunters. If this
- // bounty hunter differs from the majority they are set as 'Evil'
- function submitBountyData(string data_name) public {
- }
- // Called by Bounty Hunters when they wish to get data from the
- // smart contract to send to Hyperledger
- function getBountyData() public {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement