remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/remix-analyzer/test/analysis/test-contracts/solidity-v0.4.24/KingOfTheEtherThrone.sol

23 lines
567 B

// return value send
contract KingOfTheEtherThrone{
struct Monarch {
// address of the king .
address ethAddr ;
string name ;
// how much he pays to previous king
uint claimPrice ;
uint coronationTimestamp;
}
Monarch public currentMonarch ;
function claimThrone ( string name ) {
address wizardAddress;
uint compensation = 100;
uint valuePaid = 10;
if ( currentMonarch.ethAddr != wizardAddress )
if (currentMonarch.ethAddr.send( compensation )) throw;
currentMonarch = Monarch(msg.sender,name,valuePaid,block.timestamp);
}
}