//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.19; import "./ownable.sol"; // Permissions library contract connectionEstablishment is Ownable{ uint bidFee = 0.001 ether; // Fee to post a bid // This is how we withdraw fees collected function withdraw() external onlyOwner { owner.transfer(this.balance); } // This is how we update the fee function setBidFee(uint _fee) external onlyOwner { bidFee = _fee; } struct Bid { uint32 sourceAddress; // SO IP uint16 sourcePort; // SO Port uint32 destinationAddress; // Sat Cat Number uint16 destinationPort; // Satellite Port uint32 token; // token required for MPTCP transport address paymentAddress; // This should be send to msg.sender uint64 reward; // Payment per block } Bid[] public marketplace; // initialize a public listing of bids mapping (uint => address) public bidToOwner; // Mapping for which bid ownership mapping (address => uint) ownerBidCount; // Mapping for number of bids currently owned // Create bid function, note that you do not have to pass paymentAddress as this is msg.Sender function _createBid( uint32 _sourceAddress, uint16 _sourcePort, uint32 _destinationAddress, uint16 _destinationPort, uint32 _token, uint64 _reward ) internal { uint id = marketplace.push(Bid( _sourceAddress, _sourcePort, _destinationAddress, _destinationPort, _token, msg.sender, _reward )) - 1; bidToOwner[id] = msg.sender; ownerBidCount++; } }
0.4.19