Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw To | 14413064 | 240 days ago | IN | 0 ETH | 0.00000008 | ||||
Withdraw To | 14413009 | 240 days ago | IN | 0 ETH | 0.00000009 | ||||
Deposit | 13689972 | 257 days ago | IN | 25 ETH | 0.00000042 | ||||
Deposit | 7247760 | 406 days ago | IN | 10 ETH | 0.00000003 | ||||
Deposit | 6573589 | 422 days ago | IN | 0.25 ETH | 0.00011367 | ||||
Add Stake | 6573472 | 422 days ago | IN | 0.1 ETH | 0.00018105 | ||||
Deposit | 6573455 | 422 days ago | IN | 0.25 ETH | 0.00016497 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
VerifyingPaymaster
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; /* solhint-disable reason-string */ /* solhint-disable no-inline-assembly */ import "account-abstraction/core/BasePaymaster.sol"; import "account-abstraction/core/UserOperationLib.sol"; import "account-abstraction/core/Helpers.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; /** * A sample paymaster that uses external service to decide whether to pay for the UserOp. * The paymaster trusts an external signer to sign the transaction. * The calling user must pass the UserOp to that external signer first, which performs * whatever off-chain verification before signing the UserOp. * Note that this signature is NOT a replacement for the account-specific signature: * - the paymaster checks a signature to agree to PAY for GAS. * - the account checks a signature to prove identity and account ownership. */ contract VerifyingPaymaster is BasePaymaster { using UserOperationLib for PackedUserOperation; address public immutable verifyingSigner; uint256 private constant VALID_TIMESTAMP_OFFSET = PAYMASTER_DATA_OFFSET; uint256 private constant SIGNATURE_OFFSET = VALID_TIMESTAMP_OFFSET + 64; constructor(IEntryPoint _entryPoint, address _verifyingSigner, address owner) BasePaymaster(_entryPoint) { verifyingSigner = _verifyingSigner; transferOwnership(owner); } /** * return the hash we're going to sign off-chain (and validate on-chain) * this method is called by the off-chain service, to sign the request. * it is called on-chain from the validatePaymasterUserOp, to validate the signature. * note that this signature covers all fields of the UserOperation, except the "paymasterAndData", * which will carry the signature itself. */ function getHash(PackedUserOperation calldata userOp, uint48 validUntil, uint48 validAfter) public view returns (bytes32) { //can't use userOp.hash(), since it contains also the paymasterAndData itself. address sender = userOp.getSender(); return keccak256( abi.encode( sender, userOp.nonce, keccak256(userOp.initCode), keccak256(userOp.callData), userOp.accountGasLimits, uint256(bytes32(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET:PAYMASTER_DATA_OFFSET])), userOp.preVerificationGas, userOp.gasFees, block.chainid, address(this), validUntil, validAfter ) ); } /** * verify our external signer signed this request. * the "paymasterAndData" is expected to be the paymaster and a signature over the entire request params * paymasterAndData[:20] : address(this) * paymasterAndData[20:84] : abi.encode(validUntil, validAfter) * paymasterAndData[84:] : signature */ function _validatePaymasterUserOp( PackedUserOperation calldata userOp, bytes32, /*userOpHash*/ uint256 requiredPreFund ) internal view override returns (bytes memory context, uint256 validationData) { (requiredPreFund); (uint48 validUntil, uint48 validAfter, bytes calldata signature) = parsePaymasterAndData(userOp.paymasterAndData); //ECDSA library supports both 64 and 65-byte long signatures. // we only "require" it here so that the revert reason on invalid signature will be of "VerifyingPaymaster", and not "ECDSA" require( signature.length == 64 || signature.length == 65, "VerifyingPaymaster: invalid signature length in paymasterAndData" ); bytes32 hash = MessageHashUtils.toEthSignedMessageHash(getHash(userOp, validUntil, validAfter)); //don't revert on signature failure: return SIG_VALIDATION_FAILED if (verifyingSigner != ECDSA.recover(hash, signature)) { return ("", _packValidationData(true, validUntil, validAfter)); } //no need for other on-chain validation: entire UserOp should have been checked // by the external service prior to signing it. return ("", _packValidationData(false, validUntil, validAfter)); } function parsePaymasterAndData(bytes calldata paymasterAndData) public pure returns (uint48 validUntil, uint48 validAfter, bytes calldata signature) { (validUntil, validAfter) = abi.decode(paymasterAndData[VALID_TIMESTAMP_OFFSET:], (uint48, uint48)); signature = paymasterAndData[SIGNATURE_OFFSET:]; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; /* solhint-disable reason-string */ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "../interfaces/IPaymaster.sol"; import "../interfaces/IEntryPoint.sol"; import "./UserOperationLib.sol"; /** * Helper class for creating a paymaster. * provides helper methods for staking. * Validates that the postOp is called only by the entryPoint. */ abstract contract BasePaymaster is IPaymaster, Ownable { IEntryPoint public immutable entryPoint; uint256 internal constant PAYMASTER_VALIDATION_GAS_OFFSET = UserOperationLib.PAYMASTER_VALIDATION_GAS_OFFSET; uint256 internal constant PAYMASTER_POSTOP_GAS_OFFSET = UserOperationLib.PAYMASTER_POSTOP_GAS_OFFSET; uint256 internal constant PAYMASTER_DATA_OFFSET = UserOperationLib.PAYMASTER_DATA_OFFSET; constructor(IEntryPoint _entryPoint) Ownable(msg.sender) { _validateEntryPointInterface(_entryPoint); entryPoint = _entryPoint; } //sanity check: make sure this EntryPoint was compiled against the same // IEntryPoint of this paymaster function _validateEntryPointInterface(IEntryPoint _entryPoint) internal virtual { require(IERC165(address(_entryPoint)).supportsInterface(type(IEntryPoint).interfaceId), "IEntryPoint interface mismatch"); } /// @inheritdoc IPaymaster function validatePaymasterUserOp( PackedUserOperation calldata userOp, bytes32 userOpHash, uint256 maxCost ) external override returns (bytes memory context, uint256 validationData) { _requireFromEntryPoint(); return _validatePaymasterUserOp(userOp, userOpHash, maxCost); } /** * Validate a user operation. * @param userOp - The user operation. * @param userOpHash - The hash of the user operation. * @param maxCost - The maximum cost of the user operation. */ function _validatePaymasterUserOp( PackedUserOperation calldata userOp, bytes32 userOpHash, uint256 maxCost ) internal virtual returns (bytes memory context, uint256 validationData); /// @inheritdoc IPaymaster function postOp( PostOpMode mode, bytes calldata context, uint256 actualGasCost, uint256 actualUserOpFeePerGas ) external override { _requireFromEntryPoint(); _postOp(mode, context, actualGasCost, actualUserOpFeePerGas); } /** * Post-operation handler. * (verified to be called only through the entryPoint) * @dev If subclass returns a non-empty context from validatePaymasterUserOp, * it must also implement this method. * @param mode - Enum with the following options: * opSucceeded - User operation succeeded. * opReverted - User op reverted. The paymaster still has to pay for gas. * postOpReverted - never passed in a call to postOp(). * @param context - The context value returned by validatePaymasterUserOp * @param actualGasCost - Actual gas used so far (without this postOp call). * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas * and maxPriorityFee (and basefee) * It is not the same as tx.gasprice, which is what the bundler pays. */ function _postOp( PostOpMode mode, bytes calldata context, uint256 actualGasCost, uint256 actualUserOpFeePerGas ) internal virtual { (mode, context, actualGasCost, actualUserOpFeePerGas); // unused params // subclass must override this method if validatePaymasterUserOp returns a context revert("must override"); } /** * Add a deposit for this paymaster, used for paying for transaction fees. */ function deposit() public payable { entryPoint.depositTo{value: msg.value}(address(this)); } /** * Withdraw value from the deposit. * @param withdrawAddress - Target to send to. * @param amount - Amount to withdraw. */ function withdrawTo( address payable withdrawAddress, uint256 amount ) public onlyOwner { entryPoint.withdrawTo(withdrawAddress, amount); } /** * Add stake for this paymaster. * This method can also carry eth value to add to the current stake. * @param unstakeDelaySec - The unstake delay for this paymaster. Can only be increased. */ function addStake(uint32 unstakeDelaySec) external payable onlyOwner { entryPoint.addStake{value: msg.value}(unstakeDelaySec); } /** * Return current paymaster's deposit on the entryPoint. */ function getDeposit() public view returns (uint256) { return entryPoint.balanceOf(address(this)); } /** * Unlock the stake, in order to withdraw it. * The paymaster can't serve requests once unlocked, until it calls addStake again */ function unlockStake() external onlyOwner { entryPoint.unlockStake(); } /** * Withdraw the entire paymaster's stake. * stake must be unlocked first (and then wait for the unstakeDelay to be over) * @param withdrawAddress - The address to send withdrawn value. */ function withdrawStake(address payable withdrawAddress) external onlyOwner { entryPoint.withdrawStake(withdrawAddress); } /** * Validate the call is made from a valid entrypoint */ function _requireFromEntryPoint() internal virtual { require(msg.sender == address(entryPoint), "Sender not EntryPoint"); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; /* solhint-disable no-inline-assembly */ import "../interfaces/PackedUserOperation.sol"; import {calldataKeccak, min} from "./Helpers.sol"; /** * Utility functions helpful when working with UserOperation structs. */ library UserOperationLib { uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20; uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36; uint256 public constant PAYMASTER_DATA_OFFSET = 52; /** * Get sender from user operation data. * @param userOp - The user operation data. */ function getSender( PackedUserOperation calldata userOp ) internal pure returns (address) { address data; //read sender from userOp, which is first userOp member (saves 800 gas...) assembly { data := calldataload(userOp) } return address(uint160(data)); } /** * Relayer/block builder might submit the TX with higher priorityFee, * but the user should not pay above what he signed for. * @param userOp - The user operation data. */ function gasPrice( PackedUserOperation calldata userOp ) internal view returns (uint256) { unchecked { (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees); if (maxFeePerGas == maxPriorityFeePerGas) { //legacy mode (for networks that don't support basefee opcode) return maxFeePerGas; } return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee); } } /** * Pack the user operation data into bytes for hashing. * @param userOp - The user operation data. */ function encode( PackedUserOperation calldata userOp ) internal pure returns (bytes memory ret) { address sender = getSender(userOp); uint256 nonce = userOp.nonce; bytes32 hashInitCode = calldataKeccak(userOp.initCode); bytes32 hashCallData = calldataKeccak(userOp.callData); bytes32 accountGasLimits = userOp.accountGasLimits; uint256 preVerificationGas = userOp.preVerificationGas; bytes32 gasFees = userOp.gasFees; bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData); return abi.encode( sender, nonce, hashInitCode, hashCallData, accountGasLimits, preVerificationGas, gasFees, hashPaymasterAndData ); } function unpackUints( bytes32 packed ) internal pure returns (uint256 high128, uint256 low128) { return (uint128(bytes16(packed)), uint128(uint256(packed))); } //unpack just the high 128-bits from a packed value function unpackHigh128(bytes32 packed) internal pure returns (uint256) { return uint256(packed) >> 128; } // unpack just the low 128-bits from a packed value function unpackLow128(bytes32 packed) internal pure returns (uint256) { return uint128(uint256(packed)); } function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp) internal pure returns (uint256) { return unpackHigh128(userOp.gasFees); } function unpackMaxFeePerGas(PackedUserOperation calldata userOp) internal pure returns (uint256) { return unpackLow128(userOp.gasFees); } function unpackVerificationGasLimit(PackedUserOperation calldata userOp) internal pure returns (uint256) { return unpackHigh128(userOp.accountGasLimits); } function unpackCallGasLimit(PackedUserOperation calldata userOp) internal pure returns (uint256) { return unpackLow128(userOp.accountGasLimits); } function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp) internal pure returns (uint256) { return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])); } function unpackPostOpGasLimit(PackedUserOperation calldata userOp) internal pure returns (uint256) { return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET])); } function unpackPaymasterStaticFields( bytes calldata paymasterAndData ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) { return ( address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])), uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])), uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET])) ); } /** * Hash the user operation data. * @param userOp - The user operation data. */ function hash( PackedUserOperation calldata userOp ) internal pure returns (bytes32) { return keccak256(encode(userOp)); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.23; /* solhint-disable no-inline-assembly */ /* * For simulation purposes, validateUserOp (and validatePaymasterUserOp) * must return this value in case of signature failure, instead of revert. */ uint256 constant SIG_VALIDATION_FAILED = 1; /* * For simulation purposes, validateUserOp (and validatePaymasterUserOp) * return this value on success. */ uint256 constant SIG_VALIDATION_SUCCESS = 0; /** * Returned data from validateUserOp. * validateUserOp returns a uint256, which is created by `_packedValidationData` and * parsed by `_parseValidationData`. * @param aggregator - address(0) - The account validated the signature by itself. * address(1) - The account failed to validate the signature. * otherwise - This is an address of a signature aggregator that must * be used to validate the signature. * @param validAfter - This UserOp is valid only after this timestamp. * @param validaUntil - This UserOp is valid only up to this timestamp. */ struct ValidationData { address aggregator; uint48 validAfter; uint48 validUntil; } /** * Extract sigFailed, validAfter, validUntil. * Also convert zero validUntil to type(uint48).max. * @param validationData - The packed validation data. */ function _parseValidationData( uint256 validationData ) pure returns (ValidationData memory data) { address aggregator = address(uint160(validationData)); uint48 validUntil = uint48(validationData >> 160); if (validUntil == 0) { validUntil = type(uint48).max; } uint48 validAfter = uint48(validationData >> (48 + 160)); return ValidationData(aggregator, validAfter, validUntil); } /** * Helper to pack the return value for validateUserOp. * @param data - The ValidationData to pack. */ function _packValidationData( ValidationData memory data ) pure returns (uint256) { return uint160(data.aggregator) | (uint256(data.validUntil) << 160) | (uint256(data.validAfter) << (160 + 48)); } /** * Helper to pack the return value for validateUserOp, when not using an aggregator. * @param sigFailed - True for signature failure, false for success. * @param validUntil - Last timestamp this UserOperation is valid (or zero for infinite). * @param validAfter - First timestamp this UserOperation is valid. */ function _packValidationData( bool sigFailed, uint48 validUntil, uint48 validAfter ) pure returns (uint256) { return (sigFailed ? 1 : 0) | (uint256(validUntil) << 160) | (uint256(validAfter) << (160 + 48)); } /** * keccak function over calldata. * @dev copy calldata into memory, do keccak and drop allocated memory. Strangely, this is more efficient than letting solidity do it. */ function calldataKeccak(bytes calldata data) pure returns (bytes32 ret) { assembly ("memory-safe") { let mem := mload(0x40) let len := data.length calldatacopy(mem, data.offset, len) ret := keccak256(mem, len) } } /** * The minimum of two numbers. * @param a - First number. * @param b - Second number. */ function min(uint256 a, uint256 b) pure returns (uint256) { return a < b ? a : b; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.5; import "./PackedUserOperation.sol"; /** * The interface exposed by a paymaster contract, who agrees to pay the gas for user's operations. * A paymaster must hold a stake to cover the required entrypoint stake and also the gas for the transaction. */ interface IPaymaster { enum PostOpMode { // User op succeeded. opSucceeded, // User op reverted. Still has to pay for gas. opReverted, // Only used internally in the EntryPoint (cleanup after postOp reverts). Never calling paymaster with this value postOpReverted } /** * Payment validation: check if paymaster agrees to pay. * Must verify sender is the entryPoint. * Revert to reject this request. * Note that bundlers will reject this method if it changes the state, unless the paymaster is trusted (whitelisted). * The paymaster pre-pays using its deposit, and receive back a refund after the postOp method returns. * @param userOp - The user operation. * @param userOpHash - Hash of the user's request data. * @param maxCost - The maximum cost of this transaction (based on maximum gas and gas price from userOp). * @return context - Value to send to a postOp. Zero length to signify postOp is not required. * @return validationData - Signature and time-range of this operation, encoded the same as the return * value of validateUserOperation. * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, * other values are invalid for paymaster. * <6-byte> validUntil - last timestamp this operation is valid. 0 for "indefinite" * <6-byte> validAfter - first timestamp this operation is valid * Note that the validation code cannot use block.timestamp (or block.number) directly. */ function validatePaymasterUserOp( PackedUserOperation calldata userOp, bytes32 userOpHash, uint256 maxCost ) external returns (bytes memory context, uint256 validationData); /** * Post-operation handler. * Must verify sender is the entryPoint. * @param mode - Enum with the following options: * opSucceeded - User operation succeeded. * opReverted - User op reverted. The paymaster still has to pay for gas. * postOpReverted - never passed in a call to postOp(). * @param context - The context value returned by validatePaymasterUserOp * @param actualGasCost - Actual gas used so far (without this postOp call). * @param actualUserOpFeePerGas - the gas price this UserOp pays. This value is based on the UserOp's maxFeePerGas * and maxPriorityFee (and basefee) * It is not the same as tx.gasprice, which is what the bundler pays. */ function postOp( PostOpMode mode, bytes calldata context, uint256 actualGasCost, uint256 actualUserOpFeePerGas ) external; }
/** ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation. ** Only one instance required on each chain. **/ // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.5; /* solhint-disable avoid-low-level-calls */ /* solhint-disable no-inline-assembly */ /* solhint-disable reason-string */ import "./PackedUserOperation.sol"; import "./IStakeManager.sol"; import "./IAggregator.sol"; import "./INonceManager.sol"; interface IEntryPoint is IStakeManager, INonceManager { /*** * An event emitted after each successful request. * @param userOpHash - Unique identifier for the request (hash its entire content, except signature). * @param sender - The account that generates this request. * @param paymaster - If non-null, the paymaster that pays for this request. * @param nonce - The nonce value from the request. * @param success - True if the sender transaction succeeded, false if reverted. * @param actualGasCost - Actual amount paid (by account or paymaster) for this UserOperation. * @param actualGasUsed - Total gas used by this UserOperation (including preVerification, creation, * validation and execution). */ event UserOperationEvent( bytes32 indexed userOpHash, address indexed sender, address indexed paymaster, uint256 nonce, bool success, uint256 actualGasCost, uint256 actualGasUsed ); /** * Account "sender" was deployed. * @param userOpHash - The userOp that deployed this account. UserOperationEvent will follow. * @param sender - The account that is deployed * @param factory - The factory used to deploy this account (in the initCode) * @param paymaster - The paymaster used by this UserOp */ event AccountDeployed( bytes32 indexed userOpHash, address indexed sender, address factory, address paymaster ); /** * An event emitted if the UserOperation "callData" reverted with non-zero length. * @param userOpHash - The request unique identifier. * @param sender - The sender of this request. * @param nonce - The nonce used in the request. * @param revertReason - The return bytes from the (reverted) call to "callData". */ event UserOperationRevertReason( bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason ); /** * An event emitted if the UserOperation Paymaster's "postOp" call reverted with non-zero length. * @param userOpHash - The request unique identifier. * @param sender - The sender of this request. * @param nonce - The nonce used in the request. * @param revertReason - The return bytes from the (reverted) call to "callData". */ event PostOpRevertReason( bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason ); /** * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made. * @param userOpHash - The request unique identifier. * @param sender - The sender of this request. * @param nonce - The nonce used in the request. */ event UserOperationPrefundTooLow( bytes32 indexed userOpHash, address indexed sender, uint256 nonce ); /** * An event emitted by handleOps(), before starting the execution loop. * Any event emitted before this event, is part of the validation. */ event BeforeExecution(); /** * Signature aggregator used by the following UserOperationEvents within this bundle. * @param aggregator - The aggregator used for the following UserOperationEvents. */ event SignatureAggregatorChanged(address indexed aggregator); /** * A custom revert error of handleOps, to identify the offending op. * Should be caught in off-chain handleOps simulation and not happen on-chain. * Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts. * NOTE: If simulateValidation passes successfully, there should be no reason for handleOps to fail on it. * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero). * @param reason - Revert reason. The string starts with a unique code "AAmn", * where "m" is "1" for factory, "2" for account and "3" for paymaster issues, * so a failure can be attributed to the correct entity. */ error FailedOp(uint256 opIndex, string reason); /** * A custom revert error of handleOps, to report a revert by account or paymaster. * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero). * @param reason - Revert reason. see FailedOp(uint256,string), above * @param inner - data from inner cought revert reason * @dev note that inner is truncated to 2048 bytes */ error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner); error PostOpReverted(bytes returnData); /** * Error case when a signature aggregator fails to verify the aggregated signature it had created. * @param aggregator The aggregator that failed to verify the signature */ error SignatureValidationFailed(address aggregator); // Return value of getSenderAddress. error SenderAddressResult(address sender); // UserOps handled, per aggregator. struct UserOpsPerAggregator { PackedUserOperation[] userOps; // Aggregator address IAggregator aggregator; // Aggregated signature bytes signature; } /** * Execute a batch of UserOperations. * No signature aggregator is used. * If any account requires an aggregator (that is, it returned an aggregator when * performing simulateValidation), then handleAggregatedOps() must be used instead. * @param ops - The operations to execute. * @param beneficiary - The address to receive the fees. */ function handleOps( PackedUserOperation[] calldata ops, address payable beneficiary ) external; /** * Execute a batch of UserOperation with Aggregators * @param opsPerAggregator - The operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts). * @param beneficiary - The address to receive the fees. */ function handleAggregatedOps( UserOpsPerAggregator[] calldata opsPerAggregator, address payable beneficiary ) external; /** * Generate a request Id - unique identifier for this request. * The request ID is a hash over the content of the userOp (except the signature), the entrypoint and the chainid. * @param userOp - The user operation to generate the request ID for. * @return hash the hash of this UserOperation */ function getUserOpHash( PackedUserOperation calldata userOp ) external view returns (bytes32); /** * Gas and return values during simulation. * @param preOpGas - The gas used for validation (including preValidationGas) * @param prefund - The required prefund for this operation * @param accountValidationData - returned validationData from account. * @param paymasterValidationData - return validationData from paymaster. * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp) */ struct ReturnInfo { uint256 preOpGas; uint256 prefund; uint256 accountValidationData; uint256 paymasterValidationData; bytes paymasterContext; } /** * Returned aggregated signature info: * The aggregator returned by the account, and its current stake. */ struct AggregatorStakeInfo { address aggregator; StakeInfo stakeInfo; } /** * Get counterfactual sender address. * Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation. * This method always revert, and returns the address in SenderAddressResult error * @param initCode - The constructor code to be passed into the UserOperation. */ function getSenderAddress(bytes memory initCode) external; error DelegateAndRevert(bool success, bytes ret); /** * Helper method for dry-run testing. * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result. * The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace * actual EntryPoint code is less convenient. * @param target a target contract to make a delegatecall from entrypoint * @param data data to pass to target in a delegatecall */ function delegateAndRevert(address target, bytes calldata data) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.5; /** * User Operation struct * @param sender - The sender account of this request. * @param nonce - Unique value the sender uses to verify it is not a replay. * @param initCode - If set, the account contract will be created by this constructor/ * @param callData - The method call to execute on this account. * @param accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call. * @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid. * Covers batch overhead. * @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters. * @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data * The paymaster will pay for the transaction instead of the sender. * @param signature - Sender-verified signature over the entire request, the EntryPoint address and the chain ID. */ struct PackedUserOperation { address sender; uint256 nonce; bytes initCode; bytes callData; bytes32 accountGasLimits; uint256 preVerificationGas; bytes32 gasFees; bytes paymasterAndData; bytes signature; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.7.5; /** * Manage deposits and stakes. * Deposit is just a balance used to pay for UserOperations (either by a paymaster or an account). * Stake is value locked for at least "unstakeDelay" by the staked entity. */ interface IStakeManager { event Deposited(address indexed account, uint256 totalDeposit); event Withdrawn( address indexed account, address withdrawAddress, uint256 amount ); // Emitted when stake or unstake delay are modified. event StakeLocked( address indexed account, uint256 totalStaked, uint256 unstakeDelaySec ); // Emitted once a stake is scheduled for withdrawal. event StakeUnlocked(address indexed account, uint256 withdrawTime); event StakeWithdrawn( address indexed account, address withdrawAddress, uint256 amount ); /** * @param deposit - The entity's deposit. * @param staked - True if this entity is staked. * @param stake - Actual amount of ether staked for this entity. * @param unstakeDelaySec - Minimum delay to withdraw the stake. * @param withdrawTime - First block timestamp where 'withdrawStake' will be callable, or zero if already locked. * @dev Sizes were chosen so that deposit fits into one cell (used during handleOp) * and the rest fit into a 2nd cell (used during stake/unstake) * - 112 bit allows for 10^15 eth * - 48 bit for full timestamp * - 32 bit allows 150 years for unstake delay */ struct DepositInfo { uint256 deposit; bool staked; uint112 stake; uint32 unstakeDelaySec; uint48 withdrawTime; } // API struct used by getStakeInfo and simulateValidation. struct StakeInfo { uint256 stake; uint256 unstakeDelaySec; } /** * Get deposit info. * @param account - The account to query. * @return info - Full deposit information of given account. */ function getDepositInfo( address account ) external view returns (DepositInfo memory info); /** * Get account balance. * @param account - The account to query. * @return - The deposit (for gas payment) of the account. */ function balanceOf(address account) external view returns (uint256); /** * Add to the deposit of the given account. * @param account - The account to add to. */ function depositTo(address account) external payable; /** * Add to the account's stake - amount and delay * any pending unstake is first cancelled. * @param _unstakeDelaySec - The new lock duration before the deposit can be withdrawn. */ function addStake(uint32 _unstakeDelaySec) external payable; /** * Attempt to unlock the stake. * The value can be withdrawn (using withdrawStake) after the unstake delay. */ function unlockStake() external; /** * Withdraw from the (unlocked) stake. * Must first call unlockStake and wait for the unstakeDelay to pass. * @param withdrawAddress - The address to send withdrawn value. */ function withdrawStake(address payable withdrawAddress) external; /** * Withdraw from the deposit. * @param withdrawAddress - The address to send withdrawn value. * @param withdrawAmount - The amount to withdraw. */ function withdrawTo( address payable withdrawAddress, uint256 withdrawAmount ) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.5; import "./PackedUserOperation.sol"; /** * Aggregated Signatures validator. */ interface IAggregator { /** * Validate aggregated signature. * Revert if the aggregated signature does not match the given list of operations. * @param userOps - Array of UserOperations to validate the signature for. * @param signature - The aggregated signature. */ function validateSignatures( PackedUserOperation[] calldata userOps, bytes calldata signature ) external view; /** * Validate signature of a single userOp. * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns * the aggregator this account uses. * First it validates the signature over the userOp. Then it returns data to be used when creating the handleOps. * @param userOp - The userOperation received from the user. * @return sigForUserOp - The value to put into the signature field of the userOp when calling handleOps. * (usually empty, unless account and aggregator support some kind of "multisig". */ function validateUserOpSignature( PackedUserOperation calldata userOp ) external view returns (bytes memory sigForUserOp); /** * Aggregate multiple signatures into a single value. * This method is called off-chain to calculate the signature to pass with handleOps() * bundler MAY use optimized custom code perform this aggregation. * @param userOps - Array of UserOperations to collect the signatures from. * @return aggregatedSignature - The aggregated signature. */ function aggregateSignatures( PackedUserOperation[] calldata userOps ) external view returns (bytes memory aggregatedSignature); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.5; interface INonceManager { /** * Return the next nonce for this sender. * Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop) * But UserOp with different keys can come with arbitrary order. * * @param sender the account address * @param key the high 192 bit of the nonce * @return nonce a full nonce to pass for next UserOp with this sender. */ function getNonce(address sender, uint192 key) external view returns (uint256 nonce); /** * Manually increment the nonce of the sender. * This method is exposed just for completeness.. * Account does NOT need to call it, neither during validation, nor elsewhere, * as the EntryPoint will update the nonce regardless. * Possible use-case is call it with various keys to "initialize" their nonces to one, so that future * UserOperations will not pay extra for the first transaction with a given key. */ function incrementNonce(uint192 key) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "remappings": [ "account-abstraction/=lib/account-abstraction/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc20-paymaster-contracts/=lib/erc20-paymaster-contracts/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "@openzeppelin-contracts/=lib/openzeppelin-contracts/", "@openzeppelin/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"contract IEntryPoint","name":"_entryPoint","type":"address"},{"internalType":"address","name":"_verifyingSigner","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint32","name":"unstakeDelaySec","type":"uint32"}],"name":"addStake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes32","name":"accountGasLimits","type":"bytes32"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"bytes32","name":"gasFees","type":"bytes32"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct PackedUserOperation","name":"userOp","type":"tuple"},{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"uint48","name":"validAfter","type":"uint48"}],"name":"getHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"paymasterAndData","type":"bytes"}],"name":"parsePaymasterAndData","outputs":[{"internalType":"uint48","name":"validUntil","type":"uint48"},{"internalType":"uint48","name":"validAfter","type":"uint48"},{"internalType":"bytes","name":"signature","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum IPaymaster.PostOpMode","name":"mode","type":"uint8"},{"internalType":"bytes","name":"context","type":"bytes"},{"internalType":"uint256","name":"actualGasCost","type":"uint256"},{"internalType":"uint256","name":"actualUserOpFeePerGas","type":"uint256"}],"name":"postOp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"initCode","type":"bytes"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes32","name":"accountGasLimits","type":"bytes32"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"bytes32","name":"gasFees","type":"bytes32"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct PackedUserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"maxCost","type":"uint256"}],"name":"validatePaymasterUserOp","outputs":[{"internalType":"bytes","name":"context","type":"bytes"},{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"verifyingSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"}],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040516200145938038062001459833981016040819052620000349162000236565b8233806200005d57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000068816200009b565b506200007481620000eb565b6001600160a01b03908116608052821660a0526200009281620001ae565b505050620002b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516301ffc9a760e01b815263122a0e9b60e31b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801562000137573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200015d91906200028a565b620001ab5760405162461bcd60e51b815260206004820152601e60248201527f49456e747279506f696e7420696e74657266616365206d69736d617463680000604482015260640162000054565b50565b620001b8620001ef565b6001600160a01b038116620001e457604051631e4fbdf760e01b81526000600482015260240162000054565b620001ab816200009b565b6000546001600160a01b031633146200021e5760405163118cdaa760e01b815233600482015260240162000054565b565b6001600160a01b0381168114620001ab57600080fd5b6000806000606084860312156200024c57600080fd5b8351620002598162000220565b60208501519093506200026c8162000220565b60408501519092506200027f8162000220565b809150509250925092565b6000602082840312156200029d57600080fd5b81518015158114620002ae57600080fd5b9392505050565b60805160a051611146620003136000396000818161013401526109a40152600081816102640152818161031a015281816103b1015281816105ab01528181610645015281816106b501528181610742015261080a01526111466000f3fe6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063c23a5cea11610059578063c23a5cea1461029b578063c399ec88146102bb578063d0e30db0146102d0578063f2fde38b146102d857600080fd5b80638da5cb5b1461020457806394d4ad6014610222578063b0d691fe14610252578063bb9fe6bf1461028657600080fd5b806352b7512c116100c657806352b7512c146101735780635829c5f5146101a1578063715018a6146101cf5780637c627b21146101e457600080fd5b80630396cb60146100ed578063205c28781461010257806323d9ac9b14610122575b600080fd5b6101006100fb366004610cec565b6102f8565b005b34801561010e57600080fd5b5061010061011d366004610d2e565b610383565b34801561012e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017f57600080fd5b5061019361018e366004610d73565b6103f5565b60405161016a929190610dc1565b3480156101ad57600080fd5b506101c16101bc366004610e31565b610419565b60405190815260200161016a565b3480156101db57600080fd5b50610100610529565b3480156101f057600080fd5b506101006101ff366004610ed8565b61053d565b34801561021057600080fd5b506000546001600160a01b0316610156565b34801561022e57600080fd5b5061024261023d366004610f43565b610559565b60405161016a9493929190610f85565b34801561025e57600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b34801561029257600080fd5b506101006105a1565b3480156102a757600080fd5b506101006102b6366004610fd1565b61061e565b3480156102c757600080fd5b506101c161069d565b61010061072d565b3480156102e457600080fd5b506101006102f3366004610fd1565b61078f565b6103006107d2565b604051621cb65b60e51b815263ffffffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630396cb609034906024016000604051808303818588803b15801561036757600080fd5b505af115801561037b573d6000803e3d6000fd5b505050505050565b61038b6107d2565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063205c287890604401600060405180830381600087803b15801561036757600080fd5b606060006104016107ff565b61040c85858561086f565b915091505b935093915050565b600083358060208601356104306040880188610fee565b60405161043e929190611035565b6040519081900390206104546060890189610fee565b604051610462929190611035565b604051908190039020608089013561047d60e08b018b610fee565b61048c91603491601491611045565b6104959161106f565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b6105316107d2565b61053b6000610a27565b565b6105456107ff565b6105528585858585610a77565b5050505050565b600080368161056b8560348189611045565b810190610578919061108d565b9094509250858561058b603460406110c0565b610596928290611045565b949793965094505050565b6105a96107d2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561060457600080fd5b505af1158015610618573d6000803e3d6000fd5b50505050565b6106266107d2565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063c23a5cea90602401600060405180830381600087803b15801561068957600080fd5b505af1158015610552573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610704573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072891906110e1565b905090565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561068957600080fd5b6107976107d2565b6001600160a01b0381166107c657604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6107cf81610a27565b50565b6000546001600160a01b0316331461053b5760405163118cdaa760e01b81523360048201526024016107bd565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461053b5760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b60448201526064016107bd565b606060008080368161088761023d60e08b018b610fee565b9296509094509250905060408114806108a05750604181145b610914576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e644461746160648201526084016107bd565b60006109576109248b8787610419565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90506109998184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aaf92505050565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109fc576109dd60018686610adb565b6040518060200160405280600081525090965096505050505050610411565b610a0860008686610adb565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b60448201526064016107bd565b600080600080610abf8686610b13565b925092509250610acf8282610b60565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b03576000610b06565b60015b60ff161717949350505050565b60008060008351604103610b4d5760208401516040850151606086015160001a610b3f88828585610c1d565b955095509550505050610b59565b50508151600091506002905b9250925092565b6000826003811115610b7457610b746110fa565b03610b7d575050565b6001826003811115610b9157610b916110fa565b03610baf5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610bc357610bc36110fa565b03610be45760405163fce698f760e01b8152600481018290526024016107bd565b6003826003811115610bf857610bf86110fa565b03610c19576040516335e2f38360e21b8152600481018290526024016107bd565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610c585750600091506003905082610ce2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610cd857506000925060019150829050610ce2565b9250600091508190505b9450945094915050565b600060208284031215610cfe57600080fd5b813563ffffffff81168114610d1257600080fd5b9392505050565b6001600160a01b03811681146107cf57600080fd5b60008060408385031215610d4157600080fd5b8235610d4c81610d19565b946020939093013593505050565b60006101208284031215610d6d57600080fd5b50919050565b600080600060608486031215610d8857600080fd5b833567ffffffffffffffff811115610d9f57600080fd5b610dab86828701610d5a565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610def5760208187018101516060868401015201610dd2565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e2c57600080fd5b919050565b600080600060608486031215610e4657600080fd5b833567ffffffffffffffff811115610e5d57600080fd5b610e6986828701610d5a565b935050610e7860208501610e16565b9150610e8660408501610e16565b90509250925092565b60008083601f840112610ea157600080fd5b50813567ffffffffffffffff811115610eb957600080fd5b602083019150836020828501011115610ed157600080fd5b9250929050565b600080600080600060808688031215610ef057600080fd5b853560038110610eff57600080fd5b9450602086013567ffffffffffffffff811115610f1b57600080fd5b610f2788828901610e8f565b9699909850959660408101359660609091013595509350505050565b60008060208385031215610f5657600080fd5b823567ffffffffffffffff811115610f6d57600080fd5b610f7985828601610e8f565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b600060208284031215610fe357600080fd5b8135610d1281610d19565b6000808335601e1984360301811261100557600080fd5b83018035915067ffffffffffffffff82111561102057600080fd5b602001915036819003821315610ed157600080fd5b8183823760009101908152919050565b6000808585111561105557600080fd5b8386111561106257600080fd5b5050820193919092039150565b80356020831015610ad557600019602084900360031b1b1692915050565b600080604083850312156110a057600080fd5b6110a983610e16565b91506110b760208401610e16565b90509250929050565b80820180821115610ad557634e487b7160e01b600052601160045260246000fd5b6000602082840312156110f357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209da0f81924019274222346779de206a7e6bccf682a1e50527de363f369f94d0564736f6c634300081700330000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1
Deployed Bytecode
0x6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063c23a5cea11610059578063c23a5cea1461029b578063c399ec88146102bb578063d0e30db0146102d0578063f2fde38b146102d857600080fd5b80638da5cb5b1461020457806394d4ad6014610222578063b0d691fe14610252578063bb9fe6bf1461028657600080fd5b806352b7512c116100c657806352b7512c146101735780635829c5f5146101a1578063715018a6146101cf5780637c627b21146101e457600080fd5b80630396cb60146100ed578063205c28781461010257806323d9ac9b14610122575b600080fd5b6101006100fb366004610cec565b6102f8565b005b34801561010e57600080fd5b5061010061011d366004610d2e565b610383565b34801561012e57600080fd5b506101567f000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c181565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017f57600080fd5b5061019361018e366004610d73565b6103f5565b60405161016a929190610dc1565b3480156101ad57600080fd5b506101c16101bc366004610e31565b610419565b60405190815260200161016a565b3480156101db57600080fd5b50610100610529565b3480156101f057600080fd5b506101006101ff366004610ed8565b61053d565b34801561021057600080fd5b506000546001600160a01b0316610156565b34801561022e57600080fd5b5061024261023d366004610f43565b610559565b60405161016a9493929190610f85565b34801561025e57600080fd5b506101567f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da03281565b34801561029257600080fd5b506101006105a1565b3480156102a757600080fd5b506101006102b6366004610fd1565b61061e565b3480156102c757600080fd5b506101c161069d565b61010061072d565b3480156102e457600080fd5b506101006102f3366004610fd1565b61078f565b6103006107d2565b604051621cb65b60e51b815263ffffffff821660048201527f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326001600160a01b031690630396cb609034906024016000604051808303818588803b15801561036757600080fd5b505af115801561037b573d6000803e3d6000fd5b505050505050565b61038b6107d2565b60405163040b850f60e31b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032169063205c287890604401600060405180830381600087803b15801561036757600080fd5b606060006104016107ff565b61040c85858561086f565b915091505b935093915050565b600083358060208601356104306040880188610fee565b60405161043e929190611035565b6040519081900390206104546060890189610fee565b604051610462929190611035565b604051908190039020608089013561047d60e08b018b610fee565b61048c91603491601491611045565b6104959161106f565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08084019190915260c08084019290925287013560e0830152860135610100820152466101208201523061014082015265ffffffffffff80861661016083015284166101808201526101a001604051602081830303815290604052805190602001209150509392505050565b6105316107d2565b61053b6000610a27565b565b6105456107ff565b6105528585858585610a77565b5050505050565b600080368161056b8560348189611045565b810190610578919061108d565b9094509250858561058b603460406110c0565b610596928290611045565b949793965094505050565b6105a96107d2565b7f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326001600160a01b031663bb9fe6bf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561060457600080fd5b505af1158015610618573d6000803e3d6000fd5b50505050565b6106266107d2565b60405163611d2e7560e11b81526001600160a01b0382811660048301527f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032169063c23a5cea90602401600060405180830381600087803b15801561068957600080fd5b505af1158015610552573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000907f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326001600160a01b0316906370a0823190602401602060405180830381865afa158015610704573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072891906110e1565b905090565b60405163b760faf960e01b81523060048201527f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0326001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561068957600080fd5b6107976107d2565b6001600160a01b0381166107c657604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6107cf81610a27565b50565b6000546001600160a01b0316331461053b5760405163118cdaa760e01b81523360048201526024016107bd565b336001600160a01b037f0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032161461053b5760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881b9bdd08115b9d1c9e541bda5b9d605a1b60448201526064016107bd565b606060008080368161088761023d60e08b018b610fee565b9296509094509250905060408114806108a05750604181145b610914576040805162461bcd60e51b81526020600482015260248101919091527f566572696679696e675061796d61737465723a20696e76616c6964207369676e60448201527f6174757265206c656e67746820696e207061796d6173746572416e644461746160648201526084016107bd565b60006109576109248b8787610419565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90506109998184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610aaf92505050565b6001600160a01b03167f000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c16001600160a01b0316146109fc576109dd60018686610adb565b6040518060200160405280600081525090965096505050505050610411565b610a0860008686610adb565b6040805160208101909152600081529b909a5098505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405162461bcd60e51b815260206004820152600d60248201526c6d757374206f7665727269646560981b60448201526064016107bd565b600080600080610abf8686610b13565b925092509250610acf8282610b60565b50909150505b92915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b85610b03576000610b06565b60015b60ff161717949350505050565b60008060008351604103610b4d5760208401516040850151606086015160001a610b3f88828585610c1d565b955095509550505050610b59565b50508151600091506002905b9250925092565b6000826003811115610b7457610b746110fa565b03610b7d575050565b6001826003811115610b9157610b916110fa565b03610baf5760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610bc357610bc36110fa565b03610be45760405163fce698f760e01b8152600481018290526024016107bd565b6003826003811115610bf857610bf86110fa565b03610c19576040516335e2f38360e21b8152600481018290526024016107bd565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610c585750600091506003905082610ce2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610cac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610cd857506000925060019150829050610ce2565b9250600091508190505b9450945094915050565b600060208284031215610cfe57600080fd5b813563ffffffff81168114610d1257600080fd5b9392505050565b6001600160a01b03811681146107cf57600080fd5b60008060408385031215610d4157600080fd5b8235610d4c81610d19565b946020939093013593505050565b60006101208284031215610d6d57600080fd5b50919050565b600080600060608486031215610d8857600080fd5b833567ffffffffffffffff811115610d9f57600080fd5b610dab86828701610d5a565b9660208601359650604090950135949350505050565b604081526000835180604084015260005b81811015610def5760208187018101516060868401015201610dd2565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b803565ffffffffffff81168114610e2c57600080fd5b919050565b600080600060608486031215610e4657600080fd5b833567ffffffffffffffff811115610e5d57600080fd5b610e6986828701610d5a565b935050610e7860208501610e16565b9150610e8660408501610e16565b90509250925092565b60008083601f840112610ea157600080fd5b50813567ffffffffffffffff811115610eb957600080fd5b602083019150836020828501011115610ed157600080fd5b9250929050565b600080600080600060808688031215610ef057600080fd5b853560038110610eff57600080fd5b9450602086013567ffffffffffffffff811115610f1b57600080fd5b610f2788828901610e8f565b9699909850959660408101359660609091013595509350505050565b60008060208385031215610f5657600080fd5b823567ffffffffffffffff811115610f6d57600080fd5b610f7985828601610e8f565b90969095509350505050565b600065ffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b600060208284031215610fe357600080fd5b8135610d1281610d19565b6000808335601e1984360301811261100557600080fd5b83018035915067ffffffffffffffff82111561102057600080fd5b602001915036819003821315610ed157600080fd5b8183823760009101908152919050565b6000808585111561105557600080fd5b8386111561106257600080fd5b5050820193919092039150565b80356020831015610ad557600019602084900360031b1b1692915050565b600080604083850312156110a057600080fd5b6110a983610e16565b91506110b760208401610e16565b90509250929050565b80820180821115610ad557634e487b7160e01b600052601160045260246000fd5b6000602082840312156110f357600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209da0f81924019274222346779de206a7e6bccf682a1e50527de363f369f94d0564736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1
-----Decoded View---------------
Arg [0] : _entryPoint (address): 0x0000000071727De22E5E9d8BAf0edAc6f37da032
Arg [1] : _verifyingSigner (address): 0x433704c40F80cBff02e86FD36Bc8baC5e31eB0c1
Arg [2] : owner (address): 0x433704c40F80cBff02e86FD36Bc8baC5e31eB0c1
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da032
Arg [1] : 000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1
Arg [2] : 000000000000000000000000433704c40f80cbff02e86fd36bc8bac5e31eb0c1
Deployed Bytecode Sourcemap
974:3780:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4651:140:0;;;;;;:::i;:::-;;:::i;:::-;;4255:171;;;;;;;;;;-1:-1:-1;4255:171:0;;;;;:::i;:::-;;:::i;1078:40:17:-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;939:32:18;;;921:51;;909:2;894:18;1078:40:17;;;;;;;;1428:321:0;;;;;;;;;;-1:-1:-1;1428:321:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1885:853:17:-;;;;;;;;;;-1:-1:-1;1885:853:17;;;;;:::i;:::-;;:::i;:::-;;;3131:25:18;;;3119:2;3104:18;1885:853:17;2985:177:18;2293:101:9;;;;;;;;;;;;;:::i;2225:278:0:-;;;;;;;;;;-1:-1:-1;2225:278:0;;;;;:::i;:::-;;:::i;1638:85:9:-;;;;;;;;;;-1:-1:-1;1684:7:9;1710:6;-1:-1:-1;;;;;1710:6:9;1638:85;;4403:349:17;;;;;;;;;;-1:-1:-1;4403:349:17;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;544:39:0:-;;;;;;;;;;;;;;;5144:83;;;;;;;;;;;;;:::i;5448:133::-;;;;;;;;;;-1:-1:-1;5448:133:0;;;;;:::i;:::-;;:::i;4874:111::-;;;;;;;;;;;;;:::i;3986:104::-;;;:::i;2543:215:9:-;;;;;;;;;;-1:-1:-1;2543:215:9;;;;;:::i;:::-;;:::i;4651:140:0:-;1531:13:9;:11;:13::i;:::-;4730:54:0::1;::::0;-1:-1:-1;;;4730:54:0;;6340:10:18;6328:23;;4730:54:0::1;::::0;::::1;6310:42:18::0;4730:10:0::1;-1:-1:-1::0;;;;;4730:19:0::1;::::0;::::1;::::0;4757:9:::1;::::0;6283:18:18;;4730:54:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;4651:140:::0;:::o;4255:171::-;1531:13:9;:11;:13::i;:::-;4373:46:0::1;::::0;-1:-1:-1;;;4373:46:0;;-1:-1:-1;;;;;6571:32:18;;;4373:46:0::1;::::0;::::1;6553:51:18::0;6620:18;;;6613:34;;;4373:10:0::1;:21;::::0;::::1;::::0;6526:18:18;;4373:46:0::1;;;;;;;;;;;;;;;;;::::0;::::1;1428:321:::0;1592:20;1614:22;1648:24;:22;:24::i;:::-;1689:53;1714:6;1722:10;1734:7;1689:24;:53::i;:::-;1682:60;;;;1428:321;;;;;;;:::o;1885:853:17:-;2022:7;854:20:2;;;2259:12:17;;;;2299:15;;;;854:20:2;2299:15:17;:::i;:::-;2289:26;;;;;;;:::i;:::-;;;;;;;;;2343:15;;;;:6;:15;:::i;:::-;2333:26;;;;;;;:::i;:::-;;;;;;;;;2377:23;;;;2434;;;;2377:6;2434:23;:::i;:::-;:78;;490:2:2;;372;;2434:78:17;:::i;:::-;2426:87;;;:::i;:::-;2207:514;;;-1:-1:-1;;;;;8565:15:18;;;2207:514:17;;;8547:34:18;8597:18;;8590:34;;;;8640:18;;;8633:34;;;;8683:18;;;8676:34;2532:25:17;8726:19:18;;;8719:35;;;;2575:14:17;8770:19:18;;;8763:35;;;;2532:25:17;;;8814:19:18;;;8807:35;2575:14:17;;;8858:19:18;;;8851:35;2607:13:17;8902:19:18;;;8895:35;2646:4:17;8946:19:18;;;8939:44;9002:14;9053:16;;;9032:19;;;9025:45;9107:16;;9086:19;;;9079:45;8481:19;;2207:514:17;;;;;;;;;;;;2184:547;;;;;;2177:554;;;1885:853;;;;;:::o;2293:101:9:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2225:278:0:-;2402:24;:22;:24::i;:::-;2436:60;2444:4;2450:7;;2459:13;2474:21;2436:7;:60::i;:::-;2225:278;;;;;:::o;4403:349:17:-;4512:17;;4550:24;4512:17;4628:41;:16;490:2:2;4628:16:17;;:41;:::i;:::-;4617:71;;;;;;;:::i;:::-;4590:98;;-1:-1:-1;4590:98:17;-1:-1:-1;4710:16:17;;1247:27;490:2:2;1272::17;1247:27;:::i;:::-;4710:35;;;;;:::i;:::-;4403:349;;;;-1:-1:-1;4698:47:17;-1:-1:-1;;;4403:349:17:o;5144:83:0:-;1531:13:9;:11;:13::i;:::-;5196:10:0::1;-1:-1:-1::0;;;;;5196:22:0::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;5144:83::o:0;5448:133::-;1531:13:9;:11;:13::i;:::-;5533:41:0::1;::::0;-1:-1:-1;;;5533:41:0;;-1:-1:-1;;;;;939:32:18;;;5533:41:0::1;::::0;::::1;921:51:18::0;5533:10:0::1;:24;::::0;::::1;::::0;894:18:18;;5533:41:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;4874:111:::0;4943:35;;-1:-1:-1;;;4943:35:0;;4972:4;4943:35;;;921:51:18;4917:7:0;;4943:10;-1:-1:-1;;;;;4943:20:0;;;;894:18:18;;4943:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4936:42;;4874:111;:::o;3986:104::-;4030:53;;-1:-1:-1;;;4030:53:0;;4077:4;4030:53;;;921:51:18;4030:10:0;-1:-1:-1;;;;;4030:20:0;;;;4058:9;;894:18:18;;4030:53:0;;;;;;;;;;;;;;;;;;;2543:215:9;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:9;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:9;;2700:1:::1;2672:31;::::0;::::1;921:51:18::0;894:18;;2672:31:9::1;;;;;;;;2623:91;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:9;735:10:10;1855:23:9;1851:101;;1901:40;;-1:-1:-1;;;1901:40:9;;735:10:10;1901:40:9;;;921:51:18;894:18;;1901:40:9;775:203:18;5660:135:0;5729:10;-1:-1:-1;;;;;5751:10:0;5729:33;;5721:67;;;;-1:-1:-1;;;5721:67:0;;10238:2:18;5721:67:0;;;10220:21:18;10277:2;10257:18;;;10250:30;-1:-1:-1;;;10296:18:18;;;10289:51;10357:18;;5721:67:0;10036:345:18;3078:1319:17;3260:20;3282:22;;;3383:24;3282:22;3423:46;3445:23;;;;:6;:23;:::i;3423:46::-;3344:125;;-1:-1:-1;3344:125:17;;-1:-1:-1;3344:125:17;-1:-1:-1;3344:125:17;-1:-1:-1;3723:2:17;3703:22;;;:48;;-1:-1:-1;3749:2:17;3729:22;;3703:48;3682:159;;;;;-1:-1:-1;;;3682:159:17;;10588:2:18;3682:159:17;;;10570:21:18;10607:18;;;10600:30;;;;10666:34;10646:18;;;10639:62;10737:34;10717:18;;;10710:62;10789:19;;3682:159:17;10386:428:18;3682:159:17;3851:12;3866:80;3906:39;3914:6;3922:10;3934;3906:7;:39::i;:::-;1403:34:13;1298:14;1390:48;;;1499:4;1492:25;;;;1597:4;1581:21;;;1222:460;3866:80:17;3851:95;;4054:30;4068:4;4074:9;;4054:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4054:13:17;;-1:-1:-1;;;4054:30:17:i;:::-;-1:-1:-1;;;;;4035:49:17;:15;-1:-1:-1;;;;;4035:49:17;;4031:142;;4112:49;4132:4;4138:10;4150;4112:19;:49::i;:::-;4100:62;;;;;;;;;;;;;;;;;;;;;;;;4031:142;4339:50;4359:5;4366:10;4378;4339:19;:50::i;:::-;4327:63;;;;;;;;;-1:-1:-1;4327:63:17;;;;;-1:-1:-1;3078:1319:17;-1:-1:-1;;;;;;;;;3078:1319:17:o;2912:187:9:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:9;;;-1:-1:-1;;;;;;3020:17:9;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;3507:378:0:-;3855:23;;-1:-1:-1;;;3855:23:0;;11021:2:18;3855:23:0;;;11003:21:18;11060:2;11040:18;;;11033:30;-1:-1:-1;;;11079:18:18;;;11072:43;11132:18;;3855:23:0;10819:337:18;3702:255:12;3780:7;3800:17;3819:18;3839:16;3859:27;3870:4;3876:9;3859:10;:27::i;:::-;3799:87;;;;;;3896:28;3908:5;3915:8;3896:11;:28::i;:::-;-1:-1:-1;3941:9:12;;-1:-1:-1;;3702:255:12;;;;;:::o;2448:248:1:-;2559:7;2683:8;2667:10;2659:19;;:33;;2643:3;2628:10;2620:19;;:26;;2590:9;:17;;2606:1;2590:17;;;2602:1;2590:17;2589:58;;;:104;;2448:248;-1:-1:-1;;;;2448:248:1:o;2129:766:12:-;2210:7;2219:12;2233:7;2256:9;:16;2276:2;2256:22;2252:637;;2592:4;2577:20;;2571:27;2641:4;2626:20;;2620:27;2698:4;2683:20;;2677:27;2294:9;2669:36;2739:25;2750:4;2669:36;2571:27;2620;2739:10;:25::i;:::-;2732:32;;;;;;;;;;;2252:637;-1:-1:-1;;2860:16:12;;2811:1;;-1:-1:-1;2815:35:12;;2252:637;2129:766;;;;;:::o;7196:532::-;7291:20;7282:5;:29;;;;;;;;:::i;:::-;;7278:444;;7196:532;;:::o;7278:444::-;7387:29;7378:5;:38;;;;;;;;:::i;:::-;;7374:348;;7439:23;;-1:-1:-1;;;7439:23:12;;;;;;;;;;;7374:348;7492:35;7483:5;:44;;;;;;;;:::i;:::-;;7479:243;;7550:46;;-1:-1:-1;;;7550:46:12;;;;;3131:25:18;;;3104:18;;7550:46:12;2985:177:18;7479:243:12;7626:30;7617:5;:39;;;;;;;;:::i;:::-;;7613:109;;7679:32;;-1:-1:-1;;;7679:32:12;;;;;3131:25:18;;;3104:18;;7679:32:12;2985:177:18;7613:109:12;7196:532;;:::o;5140:1530::-;5266:7;;;6199:66;6186:79;;6182:164;;;-1:-1:-1;6297:1:12;;-1:-1:-1;6301:30:12;;-1:-1:-1;6333:1:12;6281:54;;6182:164;6457:24;;;6440:14;6457:24;;;;;;;;;11520:25:18;;;11593:4;11581:17;;11561:18;;;11554:45;;;;11615:18;;;11608:34;;;11658:18;;;11651:34;;;6457:24:12;;11492:19:18;;6457:24:12;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6457:24:12;;-1:-1:-1;;6457:24:12;;;-1:-1:-1;;;;;;;6495:20:12;;6491:113;;-1:-1:-1;6547:1:12;;-1:-1:-1;6551:29:12;;-1:-1:-1;6547:1:12;;-1:-1:-1;6531:62:12;;6491:113;6622:6;-1:-1:-1;6630:20:12;;-1:-1:-1;6630:20:12;;-1:-1:-1;5140:1530:12;;;;;;;;;:::o;14:276:18:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:10;223:5;219:22;212:5;209:33;199:61;;256:1;253;246:12;199:61;279:5;14:276;-1:-1:-1;;;14:276:18:o;295:139::-;-1:-1:-1;;;;;378:31:18;;368:42;;358:70;;424:1;421;414:12;439:331;515:6;523;576:2;564:9;555:7;551:23;547:32;544:52;;;592:1;589;582:12;544:52;631:9;618:23;650:39;683:5;650:39;:::i;:::-;708:5;760:2;745:18;;;;732:32;;-1:-1:-1;;;439:331:18:o;983:168::-;1055:5;1100:3;1091:6;1086:3;1082:16;1078:26;1075:46;;;1117:1;1114;1107:12;1075:46;-1:-1:-1;1139:6:18;983:168;-1:-1:-1;983:168:18:o;1156:516::-;1272:6;1280;1288;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;1430:18;1422:6;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485:79;1556:7;1547:6;1536:9;1532:22;1485:79;:::i;:::-;1475:89;1611:2;1596:18;;1583:32;;-1:-1:-1;1662:2:18;1647:18;;;1634:32;;1156:516;-1:-1:-1;;;;1156:516:18:o;1677:602::-;1852:2;1841:9;1834:21;1815:4;1884:6;1878:13;1927:6;1922:2;1911:9;1907:18;1900:34;1952:1;1962:144;1976:6;1973:1;1970:13;1962:144;;;2089:4;2073:14;;;2069:25;;2063:32;2058:2;2039:17;;;2035:26;2028:68;1991:12;1962:144;;;1966:3;2155:1;2150:2;2141:6;2130:9;2126:22;2122:31;2115:42;2225:2;2218;2214:7;2209:2;2201:6;2197:15;2193:29;2182:9;2178:45;2174:54;2166:62;;;2266:6;2259:4;2248:9;2244:20;2237:36;1677:602;;;;;:::o;2284:167::-;2351:20;;2411:14;2400:26;;2390:37;;2380:65;;2441:1;2438;2431:12;2380:65;2284:167;;;:::o;2456:524::-;2570:6;2578;2586;2639:2;2627:9;2618:7;2614:23;2610:32;2607:52;;;2655:1;2652;2645:12;2607:52;2695:9;2682:23;2728:18;2720:6;2717:30;2714:50;;;2760:1;2757;2750:12;2714:50;2783:79;2854:7;2845:6;2834:9;2830:22;2783:79;:::i;:::-;2773:89;;;2881:37;2914:2;2903:9;2899:18;2881:37;:::i;:::-;2871:47;;2937:37;2970:2;2959:9;2955:18;2937:37;:::i;:::-;2927:47;;2456:524;;;;;:::o;3167:347::-;3218:8;3228:6;3282:3;3275:4;3267:6;3263:17;3259:27;3249:55;;3300:1;3297;3290:12;3249:55;-1:-1:-1;3323:20:18;;3366:18;3355:30;;3352:50;;;3398:1;3395;3388:12;3352:50;3435:4;3427:6;3423:17;3411:29;;3487:3;3480:4;3471:6;3463;3459:19;3455:30;3452:39;3449:59;;;3504:1;3501;3494:12;3449:59;3167:347;;;;;:::o;3519:705::-;3631:6;3639;3647;3655;3663;3716:3;3704:9;3695:7;3691:23;3687:33;3684:53;;;3733:1;3730;3723:12;3684:53;3772:9;3759:23;3811:1;3804:5;3801:12;3791:40;;3827:1;3824;3817:12;3791:40;3850:5;-1:-1:-1;3906:2:18;3891:18;;3878:32;3933:18;3922:30;;3919:50;;;3965:1;3962;3955:12;3919:50;4004:58;4054:7;4045:6;4034:9;4030:22;4004:58;:::i;:::-;3519:705;;4081:8;;-1:-1:-1;3978:84:18;;4163:2;4148:18;;4135:32;;4214:2;4199:18;;;4186:32;;-1:-1:-1;3519:705:18;-1:-1:-1;;;;3519:705:18:o;4229:409::-;4299:6;4307;4360:2;4348:9;4339:7;4335:23;4331:32;4328:52;;;4376:1;4373;4366:12;4328:52;4416:9;4403:23;4449:18;4441:6;4438:30;4435:50;;;4481:1;4478;4471:12;4435:50;4520:58;4570:7;4561:6;4550:9;4546:22;4520:58;:::i;:::-;4597:8;;4494:84;;-1:-1:-1;4229:409:18;-1:-1:-1;;;;4229:409:18:o;4643:580::-;4815:4;4844:14;4897:2;4889:6;4885:15;4874:9;4867:34;4949:2;4941:6;4937:15;4932:2;4921:9;4917:18;4910:43;;4989:2;4984;4973:9;4969:18;4962:30;5028:6;5023:2;5012:9;5008:18;5001:34;5086:6;5078;5072:3;5061:9;5057:19;5044:49;5143:1;5137:3;5128:6;5117:9;5113:22;5109:32;5102:43;5213:3;5206:2;5202:7;5197:2;5189:6;5185:15;5181:29;5170:9;5166:45;5162:55;5154:63;;4643:580;;;;;;;:::o;5456:263::-;5523:6;5576:2;5564:9;5555:7;5551:23;5547:32;5544:52;;;5592:1;5589;5582:12;5544:52;5631:9;5618:23;5650:39;5683:5;5650:39;:::i;6658:521::-;6735:4;6741:6;6801:11;6788:25;6895:2;6891:7;6880:8;6864:14;6860:29;6856:43;6836:18;6832:68;6822:96;;6914:1;6911;6904:12;6822:96;6941:33;;6993:20;;;-1:-1:-1;7036:18:18;7025:30;;7022:50;;;7068:1;7065;7058:12;7022:50;7101:4;7089:17;;-1:-1:-1;7132:14:18;7128:27;;;7118:38;;7115:58;;;7169:1;7166;7159:12;7184:271;7367:6;7359;7354:3;7341:33;7323:3;7393:16;;7418:13;;;7393:16;7184:271;-1:-1:-1;7184:271:18:o;7460:331::-;7565:9;7576;7618:8;7606:10;7603:24;7600:44;;;7640:1;7637;7630:12;7600:44;7669:6;7659:8;7656:20;7653:40;;;7689:1;7686;7679:12;7653:40;-1:-1:-1;;7715:23:18;;;7760:25;;;;;-1:-1:-1;7460:331:18:o;7796:255::-;7916:19;;7955:2;7947:11;;7944:101;;;-1:-1:-1;;8016:2:18;8012:12;;;8009:1;8005:20;8001:33;7990:45;7796:255;;;;:::o;9135:256::-;9201:6;9209;9262:2;9250:9;9241:7;9237:23;9233:32;9230:52;;;9278:1;9275;9268:12;9230:52;9301:28;9319:9;9301:28;:::i;:::-;9291:38;;9348:37;9381:2;9370:9;9366:18;9348:37;:::i;:::-;9338:47;;9135:256;;;;;:::o;9396:222::-;9461:9;;;9482:10;;;9479:133;;;9534:10;9529:3;9525:20;9522:1;9515:31;9569:4;9566:1;9559:15;9597:4;9594:1;9587:15;9847:184;9917:6;9970:2;9958:9;9949:7;9945:23;9941:32;9938:52;;;9986:1;9983;9976:12;9938:52;-1:-1:-1;10009:16:18;;9847:184;-1:-1:-1;9847:184:18:o;11161:127::-;11222:10;11217:3;11213:20;11210:1;11203:31;11253:4;11250:1;11243:15;11277:4;11274:1;11267:15
Swarm Source
ipfs://9da0f81924019274222346779de206a7e6bccf682a1e50527de363f369f94d05
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.