hacked contract

hacked contract



Unfortunately, the contract we created with great hopes last night was hacklendi. we still do not understand how it is, the owner's address is changed. we are trying to figure this out because we want to fix it in our next contract. Please click to go to the contract.



Is there anyone who can help me?




1 Answer
1



Here's a function that anyone can call to make themselves owner:


owner


function HTX () public
owner = msg.sender;
uint256 devTokens = 1000000000e8;
distr(owner, devTokens);



This was probably meant to be a constructor. In current versions of Solidity, this should be:


constructor() public {
...



but it's also still acceptable (but deprecated) to use a function with the same name as the contract. In this case:


function HitexToken() public {
...





Thank you very much for your reply. well, Is there a way to get this contract back?
– hit
Aug 26 at 16:40





Well, you can call HTX() and become the owner again, but I don't see the point. There are no more tokens and no more ether. (And anyone can come along at any time to become owner again.)
– smarx
Aug 26 at 16:47


HTX()


owner


owner





I am trying to change the owner address but "ALERT: Transaction Error. Exception thrown in contract code." I get an error. ibb.co/dgpoiU
– hit
Aug 26 at 18:00





Is the account you're using currently the owner? You can't call transferOwnership unless you're the owner.
– smarx
Aug 26 at 18:04


owner


transferOwnership


owner





no. This is the old account holder. this creator address. then hacked and changed. I am trying to make the address again as the owner of this contract. am applying the wrong method?
– hit
Aug 26 at 18:30






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ