Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x3d6100c3 | 21758090 | 37 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Minimal Proxy Contract for 0x40a1c08084671e9a799b73853e82308225309dc0
Contract Name:
WeirollWallet
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
No with 5000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity ^0.8.0;import { VM } from "lib/enso-weiroll/contracts/VM.sol";import { Clone } from "lib/clones-with-immutable-args/src/Clone.sol";import { IERC1271 } from "src/interfaces/IERC1271.sol";import { ECDSA } from "lib/solady/src/utils/ECDSA.sol";/// @title WeirollWallet/// @author Jack Corddry, Shivaansh Kapoor, CopyPaste/// @notice WeirollWallet implementation contract./// @notice Implements a simple smart contract wallet that can execute Weiroll VM commandscontract WeirollWallet is IERC1271, Clone, VM {// Returned to indicate a valid ERC1271 signaturebytes4 internal constant ERC1271_MAGIC_VALUE = 0x1626ba7e; // bytes4(keccak256("isValidSignature(bytes32,bytes)")// Returned to indicate an invalid ERC1271 signaturebytes4 internal constant INVALID_SIGNATURE = 0x00000000;/// @notice Let the Weiroll Wallet receive ether directly if neededreceive() external payable { }/// @notice Also allow a fallback with no logic if erroneous data is providedfallback() external payable { }/*//////////////////////////////////////////////////////////////MODIFIERS//////////////////////////////////////////////////////////////*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-3.0-onlypragma solidity ^0.8.16;import "./CommandBuilder.sol";abstract contract VM {using CommandBuilder for bytes[];uint256 constant FLAG_CT_DELEGATECALL = 0x00; // Delegate call not currently supporteduint256 constant FLAG_CT_CALL = 0x01;uint256 constant FLAG_CT_STATICCALL = 0x02;uint256 constant FLAG_CT_VALUECALL = 0x03;uint256 constant FLAG_CT_MASK = 0x03;uint256 constant FLAG_DATA = 0x20;uint256 constant FLAG_EXTENDED_COMMAND = 0x40;uint256 constant FLAG_TUPLE_RETURN = 0x80;uint256 constant SHORT_COMMAND_FILL =0x000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;error ExecutionFailed(uint256 command_index,address target,string message);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BSDpragma solidity ^0.8.4;/// @title Clone/// @author zefram.eth/// @notice Provides helper functions for reading immutable args from calldatacontract Clone {/// @notice Reads an immutable arg with type address/// @param argOffset The offset of the arg in the packed data/// @return arg The arg valuefunction _getArgAddress(uint256 argOffset)internalpurereturns (address arg){uint256 offset = _getImmutableArgsOffset();assembly {arg := shr(0x60, calldataload(add(offset, argOffset)))}}/// @notice Reads an immutable arg with type uint256/// @param argOffset The offset of the arg in the packed data/// @return arg The arg valuefunction _getArgUint256(uint256 argOffset)internal
12345678910111213/// SPDX-License-Identifier: MITpragma solidity ^0.8.0;/// @title IERC1271/// @notice Interface defined by EIP-1271/// @dev Interface for verifying contract account signaturesinterface IERC1271 {/// @notice Returns whether the provided signature is valid for the provided data/// @dev Returns 0x1626ba7e (magic value) when function passes./// @param digest Hash of the message to validate the signature against/// @param signature Signature produced for the provided digestfunction isValidSignature(bytes32 digest, bytes memory signature) external view returns (bytes4);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.4;/// @notice Gas optimized ECDSA wrapper./// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol)/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol)/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol)////// @dev Note:/// - The recovery functions use the ecrecover precompile (0x1)./// - As of Solady version 0.0.68, the `recover` variants will revert upon recovery failure./// This is for more safety by default./// Use the `tryRecover` variants if you need to get the zero address back/// upon recovery failure instead./// - As of Solady version 0.0.134, all `bytes signature` variants accept both/// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures./// See: https://eips.ethereum.org/EIPS/eip-2098/// This is for calldata efficiency on smart accounts prevalent on L2s.////// WARNING! Do NOT use signatures as unique identifiers:/// - Use a nonce in the digest to prevent replay attacks on the same contract./// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts./// EIP-712 also enables readable signing of typed data for better user safety./// This implementation does NOT check if a signature is non-malleable.library ECDSA {/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
12345678910111213141516171819202122232425// SPDX-License-Identifier: GPL-3.0-onlypragma solidity ^0.8.16;library CommandBuilder {uint256 constant IDX_VARIABLE_LENGTH = 0x80;uint256 constant IDX_VALUE_MASK = 0x7f;uint256 constant IDX_END_OF_ARGS = 0xff;uint256 constant IDX_USE_STATE = 0xfe;uint256 constant IDX_ARRAY_START = 0xfd;uint256 constant IDX_TUPLE_START = 0xfc;uint256 constant IDX_DYNAMIC_END = 0xfb;function buildInputs(bytes[] memory state,bytes4 selector,bytes32 indices,uint256 indicesLength) internal view returns (bytes memory ret) {uint256 idx; // The current command indexuint256 offsetIdx; // The index of the current free offsetuint256 count; // Number of bytes in whole ABI encoded messageuint256 free; // Pointer to first free byte in tail part of messageuint256[] memory dynamicLengths = new uint256[](10); // Optionally store the length of all dynamic types (a command cannot fit more than 10dynamic types)
1234567891011121314151617181920212223242526{"remappings": ["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","clones-with-immutable-args/=lib/clones-with-immutable-args/src/","ds-test/=lib/solmate/lib/ds-test/src/","enso-weiroll/=lib/enso-weiroll/contracts/","erc4626-tests/=lib/erc4626-tests/","forge-std/=lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/","solady/=lib/solady/src/","solmate/=lib/solmate/src/"],"optimizer": {"enabled": false,"runs": 5000,"details": {"constantOptimizer": true,"yul": true,"yulDetails": {"stackAllocation": true}}},"metadata": {"useLiteralContent": false,
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"command_index","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"string","name":"message","type":"string"}],"name":"ExecutionFailed","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotRecipeMarketHub","type":"error"},{"inputs":[],"name":"OfferUnfilled","type":"error"},{"inputs":[],"name":"RawExecutionFailed","type":"error"},{"inputs":[],"name":"WalletLocked","type":"error"},{"inputs":[],"name":"WalletNotForfeitable","type":"error"},{"anonymous":false,"inputs":[],"name":"WeirollWalletExecutedManually","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execute","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"commands","type":"bytes32[]"},{"internalType":"bytes[]","name":"state","type":"bytes[]"}],"name":"executeWeiroll","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"executed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forfeit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"forfeited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isForfeitable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"commands","type":"bytes32[]"},{"internalType":"bytes[]","name":"state","type":"bytes[]"}],"name":"manualExecuteWeiroll","outputs":[{"internalType":"bytes[]","name":"","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"marketHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"recipeMarketHub","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"stateMutability":"payable","type":"receive"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.