「The Ethernaut by Zeppelin Level 4. Telephone」を翻訳してみました(CryptoZombiesのように?)
原文はこちら
https://ethernaut.zeppelin.solutions
4. Telephoneをクリック
4. Telephone
難易度 1/6
下記のスマートコントラクトのオーナーを自分自身のアドレスに変更することがこのレベルのクリア条件だ。
回答の助けになるヒント
- 上記の「Help」ページから「Beyond the console」部分を参照せよ。
ソースコード
pragma solidity ^0.4.18;
contract Telephone {
address public owner;
function Telephone() public {
owner = msg.sender;
}
function changeOwner(address _owner) public {
if (tx.origin != msg.sender) {
owner = _owner;
}
}
}