Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Add Signer | 27806040 | 227 days ago | IN | 0 ETH | 0.00000012 |
Loading...
Loading
Contract Name:
BasicMultisig
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 0 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
/// @notice A very basic multisig for testing purposes, do not use in production :)
contract BasicMultisig {
mapping(address => bool) public isSigner;
modifier onlySigner() {
require(isSigner[msg.sender], "Not a signer");
_;
}
constructor(
address[] memory signers
) {
for (uint256 i; i < signers.length; ++i) {
require(signers[i] != address(0), "Signer cannot be zero address");
isSigner[signers[i]] = true;
}
}
function execute(address to, bytes calldata data) external payable onlySigner {
(bool success,) = to.call{ value: msg.value }(data);
require(success, "Execution failed");
}
function addSigner(
address newSigner
) external onlySigner {
require(newSigner != address(0), "New signer cannot be zero address");
require(!isSigner[newSigner], "Already a signer");
isSigner[newSigner] = true;
}
}{
"remappings": [
"ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/v4-core/lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"hardhat/=lib/v4-core/node_modules/hardhat/",
"permit2/=lib/v4-periphery/lib/permit2/",
"@solmate/=lib/v4-core/lib/solmate/src/",
"@solady/=lib/solady/src/",
"src:@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/contracts/",
"test:@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/contracts/",
"@v4-periphery/=lib/v4-periphery/src/",
"@v4-periphery-test/=lib/v4-periphery/test/",
"@v4-core-test/=lib/v4-periphery/lib/v4-core/test/",
"@v4-core/=lib/v4-periphery/lib/v4-core/src/",
"@v3-periphery/=lib/v3-periphery/contracts/",
"@v3-core/=lib/v3-core/contracts/",
"@uniswap/v3-core/=lib/v3-core/",
"@universal-router/=lib/universal-router/contracts/",
"@uniswap/v2-core/contracts/interfaces/=src/interfaces/",
"@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
"@openzeppelin/=lib/v4-core/lib/openzeppelin-contracts/",
"@uniswap/v3-periphery/=lib/universal-router/lib/v3-periphery/",
"@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/",
"@uniswap/v4-periphery/=lib/universal-router/lib/v4-periphery/",
"openzeppelin-contracts/=lib/v4-core/lib/openzeppelin-contracts/",
"solady/=lib/solady/src/",
"solmate/=lib/universal-router/lib/solmate/",
"universal-router/=lib/universal-router/",
"v3-core/=lib/v3-core/",
"v3-periphery/=lib/v3-periphery/contracts/",
"v4-core/=lib/v4-core/src/",
"v4-periphery/=lib/v4-periphery/"
],
"optimizer": {
"enabled": true,
"runs": 0
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": true,
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"address[]","name":"signers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"addSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234610150576104a38038038061001981610168565b928339810190602081830312610150578051906001600160401b038211610150570181601f82011215610150578051916001600160401b038311610154578260051b9160208061006a818601610168565b80968152019382010191821161015057602001915b81831061013057835f5b8151811015610121576001600160a01b036100a4828461018d565b5116156100dc576001906001600160a01b036100c0828561018d565b51165f525f60205260405f208260ff1982541617905501610089565b60405162461bcd60e51b815260206004820152601d60248201527f5369676e65722063616e6e6f74206265207a65726f20616464726573730000006044820152606490fd5b6040516102ed90816101b68239f35b82516001600160a01b03811681036101505781526020928301920161007f565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b0381118382101761015457604052565b80518210156101a15760209160051b010190565b634e487b7160e01b5f52603260045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c80631cff79cd1461016c5780637df73e27146101305763eb12d61e1461003a575f80fd5b3461012c57602036600319011261012c5761005361028f565b335f525f60205261006a60ff60405f2054166102a5565b6001600160a01b031680156100dd57805f525f60205260ff60405f2054166100a5575f525f60205260405f20600160ff198254161790555f80f35b60405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c90309039b4b3b732b960811b6044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f4e6577207369676e65722063616e6e6f74206265207a65726f206164647265736044820152607360f81b6064820152608490fd5b5f80fd5b3461012c57602036600319011261012c576001600160a01b0361015161028f565b165f525f602052602060ff60405f2054166040519015158152f35b604036600319011261012c5761018061028f565b6024356001600160401b03811161012c573660238201121561012c576004810135916001600160401b03831161012c57366024848401011161012c5760245f93928493338552846020526101da60ff6040872054166102a5565b806040519384930183378101848152039134905af13d1561028a573d6001600160401b0381116102765760405190601f8101601f19908116603f011682016001600160401b038111838210176102765760405281525f60203d92013e5b1561023e57005b60405162461bcd60e51b815260206004820152601060248201526f115e1958dd5d1a5bdb8819985a5b195960821b6044820152606490fd5b634e487b7160e01b5f52604160045260245ffd5b610237565b600435906001600160a01b038216820361012c57565b156102ac57565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba10309039b4b3b732b960a11b6044820152606490fdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ace07c3c1d3b556d42633211f0da71dc6f6d1c42
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c80631cff79cd1461016c5780637df73e27146101305763eb12d61e1461003a575f80fd5b3461012c57602036600319011261012c5761005361028f565b335f525f60205261006a60ff60405f2054166102a5565b6001600160a01b031680156100dd57805f525f60205260ff60405f2054166100a5575f525f60205260405f20600160ff198254161790555f80f35b60405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c90309039b4b3b732b960811b6044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f4e6577207369676e65722063616e6e6f74206265207a65726f206164647265736044820152607360f81b6064820152608490fd5b5f80fd5b3461012c57602036600319011261012c576001600160a01b0361015161028f565b165f525f602052602060ff60405f2054166040519015158152f35b604036600319011261012c5761018061028f565b6024356001600160401b03811161012c573660238201121561012c576004810135916001600160401b03831161012c57366024848401011161012c5760245f93928493338552846020526101da60ff6040872054166102a5565b806040519384930183378101848152039134905af13d1561028a573d6001600160401b0381116102765760405190601f8101601f19908116603f011682016001600160401b038111838210176102765760405281525f60203d92013e5b1561023e57005b60405162461bcd60e51b815260206004820152601060248201526f115e1958dd5d1a5bdb8819985a5b195960821b6044820152606490fd5b634e487b7160e01b5f52604160045260245ffd5b610237565b600435906001600160a01b038216820361012c57565b156102ac57565b60405162461bcd60e51b815260206004820152600c60248201526b2737ba10309039b4b3b732b960a11b6044820152606490fdfea164736f6c634300081a000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ace07c3c1d3b556d42633211f0da71dc6f6d1c42
-----Decoded View---------------
Arg [0] : signers (address[]): 0xaCE07c3c1D3b556D42633211f0Da71dc6F6d1c42
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 000000000000000000000000ace07c3c1d3b556d42633211f0da71dc6f6d1c42
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.