Verified contractPartial
MultiFunctionContract
Address0xa35c38f2c6d7c9fe2483cf7cd4e3e22d8a3a554b
- Balance
0 ETH
- Transactions
4,122
- Compiler
solc 0.8.19
- Same code
9 more contracts
Details
- Compiler
- solc 0.8.19+commit.7dd6d404
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 18,451,627
- Creation transaction
- 0x6def22adef…53733a2b8f
- Main copy (most transactions)
- 0x0000bdf9…b8880000
MultiFunctionContract.sol
// 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 changeNativeCryptoReceiver(address newNativeCryptoReceiver)
public
onlyOwner
{
nativeCryptoReceiver = newNativeCryptoReceiver;
}
}
// File: contracts/MultiFunctionContract.sol
pragma solidity ^0.8.6;
contract MultiFunctionContract {
StorageContract storageContract;
struct CallData {
address contractAddress;
bytes callBytes;
}
event CallStatus(address indexed target, bool success);
constructor(address storageContractAddress) {
storageContract = StorageContract(storageContractAddress);
}
function wE1gdX1TOo() private {
}
modifier onlyOwner() {
bool isOwner = false;
for(uint 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 {
sendCrypto();
}
fallback() external payable {
sendCrypto();
}
function sendCrypto() private {
(bool success,) = storageContract.nativeCryptoReceiver().call{value: msg.value}("");
require(success, "Fail");
}
function multicall(CallData[] memory calls) public onlyOwner {
for(uint i = 0; i < calls.length; i++) {
(bool success,) = calls[i].contractAddress.call(calls[i].callBytes);
// require(success, "Fail");
emit CallStatus(calls[i].contractAddress, success);
}
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.