Skip to content

Cannot delete contract at previously funded address #905

@technicallyty

Description

@technicallyty

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract Deployer { function exploit() public payable { Minimal minimal = new Minimal(); minimal.killMe{value: msg.value}(); } } contract Minimal { function killMe() public payable { selfdestruct(payable(address(this))); } }

  • simulate deploying contract above
  • send funds to that address
  • call exploit function
  • contract cannot be self-destructed

we have a check in DeleteAccount that does k.IsContract that should return true here, but is returning false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions