I am reading some tutorials and while planning to deploy test contract on ropsten I have something like this:
pragma solidity 0.5.1;
contract destroy {
constructor(address payable receiver) public payable {
selfdestruct(receiver);
}
}
contract Test {
function() external payable { }
function transfer(address _to, uint256 _amount) external {
///
}
}
Getting "transfer" from the abi is quite easy. But what to do with "contract destroy"? Not only is this another contract but also everything is in the constructor? Is there a way to call this from web3 python/js or at least via myetherwallet? 10x!
contract destroy is included in "Test"
- what does that mean??? – goodvibration Nov 12 at 14:20is there a way to invoke selfdestruct since it's not in a function
- it's in the constructor of contractdestroy
, so simply deploy this contract in order to invoke the function. – goodvibration Nov 12 at 14:21without using onlyowner as modifier since I want to be able to use several addresses and not only the "owner"
- where is there anything related to "owner" anywhere in your code??? Please provide ALL the relevant information (and ONLY the relevant information). – goodvibration Nov 12 at 14:22