Verified contractExactMIT
VictimAccountV2
Address0xae81d6bed917fa09d2bb5763e588fb79537f39b6
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.20
- Same code
Only this contract
Details
- Compiler
- solc 0.8.20+commit.a1b79de6
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,268,521
- Creation transaction
- 0x0b98634e69…90c2752045
contracts/VictimAccount.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract VictimAccountV2 {
address private _legacySlot;
address[] private _owners;
bool private _v2initialized;
event V2Initialized(address[] owners);
event Executed(address indexed dest, uint256 value);
modifier onlyV2Owner() {
bool found = false;
for (uint256 i = 0; i < _owners.length; i++) {
if (_owners[i] == msg.sender) {
found = true;
break;
}
}
require(found, "Not a V2 owner");
_;
}
function initialize(address[] memory owners) external {
require(!_v2initialized, "Already initialized");
require(owners.length > 0, "Need owners");
_v2initialized = true;
_owners = owners;
emit V2Initialized(owners);
}
function execute(address dest, uint256 value, bytes calldata data) external onlyV2Owner {
(bool ok, ) = dest.call{value: value}(data);
require(ok, "Execute failed");
emit Executed(dest, value);
}
function getOwners() external view returns (address[] memory) {
return _owners;
}
function isInitialized() external view returns (bool) {
return _v2initialized;
}
receive() external payable {}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.