Verified contractPartial
Invite
Address0xee95e7192aef39880cda4229253e855961a8b49f
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.2.0
- Same code
4 more contracts
Details
- Compiler
- solc 0.2.0+commit.4dc2445e
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 642,001
- Creation transaction
- 0x66ac1a04bc…51f56ae365
Invite.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Scheduler {
function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock);
}
contract Invite {
enum State { Invited, Confirmed, Rated, Disputed, Hashed }
function Invite() {
initiator = msg.sender;
disputed = false;
}
function confirmRating() {
if (state != State.Rated || state != State.Disputed) throw;
if (msg.sender == initiator) initiatorConf = true;
if (msg.sender == responder) responderConf = true;
if (responderConf && initiatorConf) suicide(initiator);
if (state == State.Disputed && msg.sender == disputer) suicide(initiator);
}
function setHash(string a, string b) {
if (state != State.Hashed) throw;
dataHash1 = a;
dataHash2 = b;
}
function confirmInvite() {
if (state != State.Invited) throw;
responder = msg.sender;
state = State.Confirmed;
StateChanged(state);
}
function rate(uint r) {
if (state != State.Confirmed || state != State.Disputed) throw;
if (msg.sender == initiator && initRated == false) {
responderRating = r;
initRated = true;
} else if (msg.sender == responder && respRated == false) {
initiatorRating = r;
respRated = true;
}
if (initRated == true && respRated == true) {
state = State.Rated;
StateChanged(state);
}
}
function dispute() {
if (state != State.Rated) throw;
if (disputed == true) throw;
disputer = msg.sender;
state = State.Disputed;
StateChanged(state);
disputed = true;
bytes4 sig = bytes4(sha3("setToFinal()"));
uint targetBlock = block.number + 5760;
initiator.call(0x01991313, address(this), sig, targetBlock);
}
function setToFinal() {
if (state != State.Disputed) throw;
suicide(initiator);
}
address public initiator;
address public responder;
address public disputer;
string public dataHash1;
string public dataHash2;
uint public initiatorRating;
uint public responderRating;
uint public rateCount;
bool public initiatorConf;
bool public responderConf;
bool public disputed;
bool public initRated;
bool public respRated;
State public state;
event StateChanged(State s);
function cancelInvite() {
if (state != State.Invited) throw;
if (msg.sender == initiator) suicide(initiator);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.