Overview
xDAI Balance
xDAI Value
$4,156.31 (@ $1.00/xDAI)More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
39705247 | 31 secs ago | 0.01 xDAI | ||||
39705197 | 4 mins ago | 0.01 xDAI | ||||
39705187 | 5 mins ago | 0.01 xDAI | ||||
39705183 | 5 mins ago | 0.01 xDAI | ||||
39705175 | 6 mins ago | 0.01 xDAI | ||||
39705161 | 7 mins ago | 0.01 xDAI | ||||
39705156 | 8 mins ago | 0.01 xDAI | ||||
39705152 | 8 mins ago | 0.01 xDAI | ||||
39705145 | 9 mins ago | 0.01 xDAI | ||||
39705138 | 9 mins ago | 0.01 xDAI | ||||
39705130 | 10 mins ago | 0.01 xDAI | ||||
39705117 | 11 mins ago | 0.01 xDAI | ||||
39705100 | 12 mins ago | 0.01 xDAI | ||||
39705090 | 13 mins ago | 0.01 xDAI | ||||
39705086 | 14 mins ago | 0.01 xDAI | ||||
39705076 | 15 mins ago | 0.01 xDAI | ||||
39705071 | 15 mins ago | 0.01 xDAI | ||||
39705067 | 15 mins ago | 0.01 xDAI | ||||
39705067 | 15 mins ago | 0.01 xDAI | ||||
39705067 | 15 mins ago | 0.01 xDAI | ||||
39705066 | 15 mins ago | 0.01 xDAI | ||||
39705066 | 15 mins ago | 0.01 xDAI | ||||
39705065 | 16 mins ago | 0.01 xDAI | ||||
39705063 | 16 mins ago | 0.01 xDAI | ||||
39705062 | 16 mins ago | 0.01 xDAI |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
AgentMech
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; import {ERC721Mech} from "../lib/gnosis-mech/contracts/ERC721Mech.sol"; // Mech delivery info struct struct MechDelivery { // Priority mech address address priorityMech; // Delivery mech address address deliveryMech; // Requester address address requester; // Response timeout window uint32 responseTimeout; } // Mech Marketplace interface interface IMechMarketplace { /// @dev Delivers a request. /// @param requestId Request id. /// @param requestData Self-descriptive opaque data-blob. /// @param deliveryMechStakingInstance Delivery mech staking instance address. /// @param deliveryMechServiceId Mech operator service Id. function deliverMarketplace( uint256 requestId, bytes memory requestData, address deliveryMechStakingInstance, uint256 deliveryMechServiceId ) external; /// @dev Gets mech delivery info. /// @param requestId Request Id. /// @return Mech delivery info. function getMechDeliveryInfo(uint256 requestId) external returns (MechDelivery memory); } // Token interface interface IToken { /// @dev Gets the owner of the `tokenId` token. /// @param tokenId Token Id that must exist. /// @return tokenOwner Token owner. function ownerOf(uint256 tokenId) external view returns (address tokenOwner); } /// @dev Provided zero address. error ZeroAddress(); /// @dev Only `marketplace` has a privilege, but the `sender` was provided. /// @param sender Sender address. /// @param manager Required sender address as a manager. error MarketplaceOnly(address sender, address manager); /// @dev Mech marketplace exists. /// @param mechMarketplace Mech marketplace address. error MarketplaceExists(address mechMarketplace); /// @dev Agent does not exist. /// @param agentId Agent Id. error AgentNotFound(uint256 agentId); /// @dev Not enough value paid. /// @param provided Provided amount. /// @param expected Expected amount. error NotEnoughPaid(uint256 provided, uint256 expected); /// @dev Request Id not found. /// @param requestId Request Id. error RequestIdNotFound(uint256 requestId); /// @dev Value overflow. /// @param provided Overflow value. /// @param max Maximum possible value. error Overflow(uint256 provided, uint256 max); /// @dev Caught reentrancy violation. error ReentrancyGuard(); /// @title AgentMech - Smart contract for extending ERC721Mech /// @dev A Mech that is operated by the holder of an ERC721 non-fungible token. contract AgentMech is ERC721Mech { event MechMarketplaceUpdated(address indexed mechMarketplace); event Deliver(address indexed sender, uint256 requestId, bytes data); event Request(address indexed sender, uint256 requestId, bytes data); event RevokeRequest(address indexed sender, uint256 requestId); event PriceUpdated(uint256 price); enum RequestStatus { DoesNotExist, Requested, Delivered } // Agent mech version number string public constant VERSION = "1.1.0"; // Domain separator type hash bytes32 public constant DOMAIN_SEPARATOR_TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Original domain separator value bytes32 public immutable domainSeparator; // Original chain Id uint256 public immutable chainId; // Minimum required price uint256 public price; // Number of undelivered requests by this mech uint256 public numUndeliveredRequests; // Number of total requests by this mech uint256 public numTotalRequests; // Number of total deliveries by this mech uint256 public numTotalDeliveries; // Mech marketplace address address public mechMarketplace; // Reentrancy lock uint256 internal _locked = 1; // Map of request counts for corresponding addresses in this agent mech mapping(address => uint256) public mapRequestCounts; // Map of delivery counts for corresponding addresses in this agent mech mapping(address => uint256) public mapDeliveryCounts; // Map of undelivered requests counts for corresponding addresses in this agent mech mapping(address => uint256) public mapUndeliveredRequestsCounts; // Cyclical map of request Ids mapping(uint256 => uint256[2]) public mapRequestIds; // Map of request Id => sender address mapping(uint256 => address) public mapRequestAddresses; // Mapping of account nonces mapping(address => uint256) public mapNonces; /// @dev AgentMech constructor. /// @param _token Address of the token contract. /// @param _tokenId The token ID. /// @param _price The minimum required price. /// @param _mechMarketplace Mech marketplace address. constructor(address _token, uint256 _tokenId, uint256 _price, address _mechMarketplace) ERC721Mech(_token, _tokenId) { // Check for zero address if (_token == address(0)) { revert ZeroAddress(); } // Check for the token to have the owner address tokenOwner = IToken(_token).ownerOf(_tokenId); if (tokenOwner == address(0)) { revert AgentNotFound(_tokenId); } // Record the mech marketplace mechMarketplace = _mechMarketplace; // Record the price price = _price; // Record chain Id chainId = block.chainid; // Compute domain separator domainSeparator = _computeDomainSeparator(); } /// @dev Computes domain separator hash. /// @return Hash of the domain separator based on its name, version, chain Id and contract address. function _computeDomainSeparator() internal view returns (bytes32) { return keccak256( abi.encode( DOMAIN_SEPARATOR_TYPE_HASH, keccak256("AgentMech"), keccak256(abi.encode(VERSION)), block.chainid, address(this) ) ); } /// @dev Performs actions before the request is posted. /// @param amount Amount of payment in wei. function _preRequest(uint256 amount, uint256, bytes memory) internal virtual { // Check the request payment if (amount < price) { revert NotEnoughPaid(amount, price); } } /// @dev Registers a request. /// @param account Requester account address. /// @param data Self-descriptive opaque data-blob. /// @param requestId Request Id. function _request( address account, bytes memory data, uint256 requestId ) internal { // Check the request payment _preRequest(msg.value, requestId, data); // Increase the requests count supplied by the sender mapRequestCounts[account]++; mapUndeliveredRequestsCounts[account]++; // Record the requestId => sender correspondence mapRequestAddresses[requestId] = account; // Record the request Id in the map // Get previous and next request Ids of the first element uint256[2] storage requestIds = mapRequestIds[0]; // Create the new element uint256[2] storage newRequestIds = mapRequestIds[requestId]; // Previous element will be zero, next element will be the current next element uint256 curNextRequestId = requestIds[1]; newRequestIds[1] = curNextRequestId; // Next element of the zero element will be the newly created element requestIds[1] = requestId; // Previous element of the current next element will be the newly created element mapRequestIds[curNextRequestId][0] = requestId; // Increase the number of undelivered requests numUndeliveredRequests++; // Increase the total number of requests numTotalRequests++; emit Request(account, requestId, data); } /// @dev Performs actions before the delivery of a request. /// @param data Self-descriptive opaque data-blob. /// @return requestData Data for the request processing. function _preDeliver(address, uint256, bytes memory data) internal virtual returns (bytes memory requestData) { requestData = data; } /// @dev Cleans the request info from all the relevant storage. /// @param account Requester account address. /// @param requestId Request Id. function _cleanRequestInfo(address account, uint256 requestId) internal { // Decrease the number of undelivered requests mapUndeliveredRequestsCounts[account]--; numUndeliveredRequests--; // Remove delivered request Id from the request Ids map uint256[2] memory requestIds = mapRequestIds[requestId]; // Check if the request Id is invalid (non existent or delivered): previous and next request Ids are zero, // and the zero's element previous request Id is not equal to the provided request Id if (requestIds[0] == 0 && requestIds[1] == 0 && mapRequestIds[0][0] != requestId) { revert RequestIdNotFound(requestId); } // Re-link previous and next elements between themselves mapRequestIds[requestIds[0]][1] = requestIds[1]; mapRequestIds[requestIds[1]][0] = requestIds[0]; // Delete the delivered element from the map delete mapRequestIds[requestId]; } /// @dev Delivers a request. /// @notice This function ultimately calls mech marketplace contract to finalize the delivery. /// @param requestId Request id. /// @param data Self-descriptive opaque data-blob. function _deliver(uint256 requestId, bytes memory data) internal returns (bytes memory requestData) { // Get an account to deliver request to address account = mapRequestAddresses[requestId]; // Get the mech delivery info from the mech marketplace MechDelivery memory mechDelivery = IMechMarketplace(mechMarketplace).getMechDeliveryInfo(requestId); // Instantly return if the request has been delivered if (mechDelivery.deliveryMech != address(0)) { return requestData; } // The account is zero if the delivery mech is different from a priority mech, or if request does not exist if (account == address(0)) { if (mechMarketplace != address(0)) { account = mechDelivery.requester; } // Check if request exists in the mech marketplace or locally in the mech if (account == address(0)) { revert RequestIdNotFound(requestId); } } else { // The account is non-zero if it is delivered by the priority mech _cleanRequestInfo(account, requestId); } // Perform a pre-delivery of the data if it needs additional parsing requestData = _preDeliver(account, requestId, data); // Increase the total number of deliveries, as the request is delivered by this mech mapDeliveryCounts[account]++; numTotalDeliveries++; emit Deliver(msg.sender, requestId, requestData); } /// @dev Registers a request without a marketplace. /// @param data Self-descriptive opaque data-blob. /// @return requestId Request Id. function request(bytes memory data) external payable returns (uint256 requestId) { if (mechMarketplace != address(0)) { revert MarketplaceExists(mechMarketplace); } // Get the local request Id requestId = getRequestId(msg.sender, data, mapNonces[msg.sender]); mapNonces[msg.sender]++; // Perform a request _request(msg.sender, data, requestId); } /// @dev Registers a request by a marketplace. /// @notice This function is called by the marketplace contract since this mech was specified as a priority one. /// @param account Requester account address. /// @param data Self-descriptive opaque data-blob. /// @param requestId Request Id. function requestFromMarketplace(address account, bytes memory data, uint256 requestId) external payable { // Check for marketplace access if (msg.sender != mechMarketplace) { revert MarketplaceOnly(msg.sender, mechMarketplace); } // Perform a request _request(account, data, requestId); } /// @dev Revokes the request from the mech that does not deliver it. /// @notice Only marketplace can call this function if the request is not delivered by the chosen priority mech. /// @param requestId Request Id. function revokeRequest(uint256 requestId) external { // Check for marketplace access // Note if mechMarketplace is zero, this function must never be called if (msg.sender != mechMarketplace) { revert MarketplaceOnly(msg.sender, mechMarketplace); } address account = mapRequestAddresses[requestId]; // This must never happen, as the priority mech recorded requestId => account info during the request if (account == address(0)) { revert ZeroAddress(); } // Clean request info _cleanRequestInfo(account, requestId); emit RevokeRequest(account, requestId); } /// @dev Delivers a request without a marketplace. /// @param requestId Request id. /// @param data Self-descriptive opaque data-blob. function deliver(uint256 requestId, bytes memory data) external onlyOperator { // Reentrancy guard if (_locked > 1) { revert ReentrancyGuard(); } _locked = 2; // Check for the marketplace existence if (mechMarketplace != address(0)) { revert MarketplaceExists(mechMarketplace); } // Request delivery _deliver(requestId, data); _locked = 1; } /// @dev Delivers a request by a marketplace. /// @notice This function ultimately calls mech marketplace contract to finalize the delivery. /// @param requestId Request id. /// @param data Self-descriptive opaque data-blob. /// @param mechStakingInstance Mech staking instance address. /// @param mechServiceId Mech operator service Id. function deliverToMarketplace( uint256 requestId, bytes memory data, address mechStakingInstance, uint256 mechServiceId ) external onlyOperator { // Reentrancy guard if (_locked > 1) { revert ReentrancyGuard(); } _locked = 2; // Check for zero address if (mechMarketplace == address(0)) { revert ZeroAddress(); } // Request delivery bytes memory requestData = _deliver(requestId, data); // Mech marketplace delivery finalization if the request was not delivered already if (requestData.length > 0) { IMechMarketplace(mechMarketplace).deliverMarketplace(requestId, requestData, mechStakingInstance, mechServiceId); } _locked = 1; } /// @dev Sets the new price. /// @param newPrice New mimimum required price. function setPrice(uint256 newPrice) external onlyOperator { price = newPrice; emit PriceUpdated(newPrice); } /// @dev Gets the already computed domain separator of recomputes one if the chain Id is different. /// @return Original or recomputed domain separator. function getDomainSeparator() public view returns (bytes32) { return block.chainid == chainId ? domainSeparator : _computeDomainSeparator(); } /// @dev Gets the request Id. /// @param account Account address. /// @param data Self-descriptive opaque data-blob. /// @param nonce Nonce. /// @return requestId Corresponding request Id. function getRequestId( address account, bytes memory data, uint256 nonce ) public view returns (uint256 requestId) { requestId = uint256(keccak256( abi.encodePacked( "\x19\x01", getDomainSeparator(), keccak256( abi.encode( account, data, nonce ) ) ) )); } /// @dev Gets the requests count for a specific account. /// @param account Account address. /// @return Requests count. function getRequestsCount(address account) external view returns (uint256) { return mapRequestCounts[account]; } /// @dev Gets the deliveries count for a specific account. /// @param account Account address. /// @return Deliveries count. function getDeliveriesCount(address account) external view returns (uint256) { return mapDeliveryCounts[account]; } /// @dev Gets the request Id status registered in this agent mech. /// @notice If marketplace is not zero, use the same function in the mech marketplace contract. /// @param requestId Request Id. /// @return status Request status. function getRequestStatus(uint256 requestId) external view returns (RequestStatus status) { // Request exists if it was recorded in the requestId => account map if (mapRequestAddresses[requestId] != address(0)) { // Get the request info uint256[2] memory requestIds = mapRequestIds[requestId]; // Check if the request Id was already delivered: previous and next request Ids are zero, // and the zero's element previous request Id is not equal to the provided request Id if (requestIds[0] == 0 && requestIds[1] == 0 && mapRequestIds[0][0] != requestId) { status = RequestStatus.Delivered; } else { status = RequestStatus.Requested; } } } /// @dev Gets the set of undelivered request Ids with Nonce. /// @param size Maximum batch size of a returned requests Id set. If the size is zero, the whole set is returned. /// @param offset The number of skipped requests that are not going to be part of the returned requests Id set. /// @return requestIds Set of undelivered request Ids. function getUndeliveredRequestIds(uint256 size, uint256 offset) external view returns (uint256[] memory requestIds) { // Get the number of undelivered requests uint256 numRequests = numUndeliveredRequests; // If size is zero, return all the requests if (size == 0) { size = numRequests; } // Check for the size + offset overflow if (size + offset > numRequests) { revert Overflow(size + offset, numRequests); } if (size > 0) { requestIds = new uint256[](size); // The first request Id is the next request Id of the zero element in the request Ids map uint256 curRequestId = mapRequestIds[0][1]; // Traverse requests a specified offset for (uint256 i = 0; i < offset; ++i) { // Next request Id of the current element based on the current request Id curRequestId = mapRequestIds[curRequestId][1]; } // Traverse the rest of requests for (uint256 i = 0; i < size; ++i) { requestIds[i] = curRequestId; // Next request Id of the current element based on the current request Id curRequestId = mapRequestIds[curRequestId][1]; } } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /* solhint-disable avoid-low-level-calls */ /* solhint-disable no-inline-assembly */ /* solhint-disable reason-string */ import "../interfaces/IAccount.sol"; import "../interfaces/IEntryPoint.sol"; import "./Helpers.sol"; /** * Basic account implementation. * this contract provides the basic logic for implementing the IAccount interface - validateUserOp * specific account implementation should inherit it and provide the account-specific logic */ abstract contract BaseAccount is IAccount { using UserOperationLib for UserOperation; //return value in case of signature failure, with no time-range. // equivalent to _packValidationData(true,0,0); uint256 constant internal SIG_VALIDATION_FAILED = 1; /** * return the account nonce. * subclass should return a nonce value that is used both by _validateAndUpdateNonce, and by the external provider (to read the current nonce) */ function nonce() public view virtual returns (uint256); /** * return the entryPoint used by this account. * subclass should return the current entryPoint used by this account. */ function entryPoint() public view virtual returns (IEntryPoint); /** * Validate user's signature and nonce. * subclass doesn't need to override this method. Instead, it should override the specific internal validation methods. */ function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds) external override virtual returns (uint256 validationData) { _requireFromEntryPoint(); validationData = _validateSignature(userOp, userOpHash); if (userOp.initCode.length == 0) { _validateAndUpdateNonce(userOp); } _payPrefund(missingAccountFunds); } /** * ensure the request comes from the known entrypoint. */ function _requireFromEntryPoint() internal virtual view { require(msg.sender == address(entryPoint()), "account: not from EntryPoint"); } /** * validate the signature is valid for this message. * @param userOp validate the userOp.signature field * @param userOpHash convenient field: the hash of the request, to check the signature against * (also hashes the entrypoint and chain id) * @return validationData signature and time-range of this operation * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, * otherwise, an address of an "authorizer" contract. * <6-byte> validUntil - last timestamp this operation is valid. 0 for "indefinite" * <6-byte> validAfter - first timestamp this operation is valid * If the account doesn't use time-range, it is enough to return SIG_VALIDATION_FAILED value (1) for signature failure. * Note that the validation code cannot use block.timestamp (or block.number) directly. */ function _validateSignature(UserOperation calldata userOp, bytes32 userOpHash) internal virtual returns (uint256 validationData); /** * validate the current nonce matches the UserOperation nonce. * then it should update the account's state to prevent replay of this UserOperation. * called only if initCode is empty (since "nonce" field is used as "salt" on account creation) * @param userOp the op to validate. */ function _validateAndUpdateNonce(UserOperation calldata userOp) internal virtual; /** * sends to the entrypoint (msg.sender) the missing funds for this transaction. * subclass MAY override this method for better funds management * (e.g. send to the entryPoint more than the minimum required, so that in future transactions * it will not be required to send again) * @param missingAccountFunds the minimum value this method should send the entrypoint. * this value MAY be zero, in case there is enough deposit, or the userOp has a paymaster. */ function _payPrefund(uint256 missingAccountFunds) internal virtual { if (missingAccountFunds != 0) { (bool success,) = payable(msg.sender).call{value : missingAccountFunds, gas : type(uint256).max}(""); (success); //ignore failure (its EntryPoint's job to verify, not account.) } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /** * returned data from validateUserOp. * validateUserOp returns a uint256, with 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 function _parseValidationData(uint 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); } // intersect account and paymaster ranges. function _intersectTimeRange(uint256 validationData, uint256 paymasterValidationData) pure returns (ValidationData memory) { ValidationData memory accountValidationData = _parseValidationData(validationData); ValidationData memory pmValidationData = _parseValidationData(paymasterValidationData); address aggregator = accountValidationData.aggregator; if (aggregator == address(0)) { aggregator = pmValidationData.aggregator; } uint48 validAfter = accountValidationData.validAfter; uint48 validUntil = accountValidationData.validUntil; uint48 pmValidAfter = pmValidationData.validAfter; uint48 pmValidUntil = pmValidationData.validUntil; if (validAfter < pmValidAfter) validAfter = pmValidAfter; if (validUntil > pmValidUntil) validUntil = pmValidUntil; 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)); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "./UserOperation.sol"; interface IAccount { /** * Validate user's signature and nonce * the entryPoint will make the call to the recipient only if this validation call returns successfully. * signature failure should be reported by returning SIG_VALIDATION_FAILED (1). * This allows making a "simulation call" without a valid signature * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure. * * @dev Must validate caller is the entryPoint. * Must validate the signature and nonce * @param userOp the operation that is about to be executed. * @param userOpHash hash of the user's request data. can be used as the basis for signature. * @param missingAccountFunds missing funds on the account's deposit in the entrypoint. * This is the minimum amount to transfer to the sender(entryPoint) to be able to make the call. * The excess is left as a deposit in the entrypoint, for future calls. * can be withdrawn anytime using "entryPoint.withdrawTo()" * In case there is a paymaster in the request (or the current deposit is high enough), this value will be zero. * @return validationData packaged ValidationData structure. use `_packValidationData` and `_unpackValidationData` to encode and decode * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, * otherwise, an address of an "authorizer" contract. * <6-byte> validUntil - last timestamp this operation is valid. 0 for "indefinite" * <6-byte> validAfter - first timestamp this operation is valid * If an account doesn't use time-range, it is enough to return SIG_VALIDATION_FAILED value (1) for signature failure. * Note that the validation code cannot use block.timestamp (or block.number) directly. */ function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds) external returns (uint256 validationData); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "./UserOperation.sol"; /** * Aggregated Signatures validator. */ interface IAggregator { /** * validate aggregated signature. * revert if the aggregated signature does not match the given list of operations. */ function validateSignatures(UserOperation[] calldata userOps, bytes calldata signature) external view; /** * validate signature of a single userOp * This method is should be called by bundler after EntryPoint.simulateValidation() returns (reverts) with ValidationResultWithAggregation * 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(UserOperation 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(UserOperation[] calldata userOps) external view returns (bytes memory aggregatedSignature); }
/** ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation. ** Only one instance required on each chain. **/ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /* solhint-disable avoid-low-level-calls */ /* solhint-disable no-inline-assembly */ /* solhint-disable reason-string */ import "./UserOperation.sol"; import "./IStakeManager.sol"; import "./IAggregator.sol"; interface IEntryPoint is IStakeManager { /*** * 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); /** * signature aggregator used by the following UserOperationEvents within this bundle. */ event SignatureAggregatorChanged(address indexed aggregator); /** * a custom revert error of handleOps, to identify the offending op. * 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. * 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. */ error FailedOp(uint256 opIndex, string reason); /** * error case when a signature aggregator fails to verify the aggregated signature it had created. */ error SignatureValidationFailed(address aggregator); /** * Successful result from simulateValidation. * @param returnInfo gas and time-range returned values * @param senderInfo stake information about the sender * @param factoryInfo stake information about the factory (if any) * @param paymasterInfo stake information about the paymaster (if any) */ error ValidationResult(ReturnInfo returnInfo, StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo); /** * Successful result from simulateValidation, if the account returns a signature aggregator * @param returnInfo gas and time-range returned values * @param senderInfo stake information about the sender * @param factoryInfo stake information about the factory (if any) * @param paymasterInfo stake information about the paymaster (if any) * @param aggregatorInfo signature aggregation info (if the account requires signature aggregator) * bundler MUST use it to verify the signature, or reject the UserOperation */ error ValidationResultWithAggregation(ReturnInfo returnInfo, StakeInfo senderInfo, StakeInfo factoryInfo, StakeInfo paymasterInfo, AggregatorStakeInfo aggregatorInfo); /** * return value of getSenderAddress */ error SenderAddressResult(address sender); /** * return value of simulateHandleOp */ error ExecutionResult(uint256 preOpGas, uint256 paid, uint48 validAfter, uint48 validUntil, bool targetSuccess, bytes targetResult); //UserOps handled, per aggregator struct UserOpsPerAggregator { UserOperation[] userOps; // aggregator address IAggregator aggregator; // aggregated signature bytes signature; } /** * Execute a batch of UserOperation. * 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(UserOperation[] 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. */ function getUserOpHash(UserOperation calldata userOp) external view returns (bytes32); /** * Simulate a call to account.validateUserOp and paymaster.validatePaymasterUserOp. * @dev this method always revert. Successful result is ValidationResult error. other errors are failures. * @dev The node must also verify it doesn't use banned opcodes, and that it doesn't reference storage outside the account's data. * @param userOp the user operation to validate. */ function simulateValidation(UserOperation calldata userOp) external; /** * gas and return values during simulation * @param preOpGas the gas used for validation (including preValidationGas) * @param prefund the required prefund for this operation * @param sigFailed validateUserOp's (or paymaster's) signature check failed * @param validAfter - first timestamp this UserOp is valid (merging account and paymaster time-range) * @param validUntil - last timestamp this UserOp is valid (merging account and paymaster time-range) * @param paymasterContext returned by validatePaymasterUserOp (to be passed into postOp) */ struct ReturnInfo { uint256 preOpGas; uint256 prefund; bool sigFailed; uint48 validAfter; uint48 validUntil; 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; /** * simulate full execution of a UserOperation (including both validation and target execution) * this method will always revert with "ExecutionResult". * it performs full validation of the UserOperation, but ignores signature error. * an optional target address is called after the userop succeeds, and its value is returned * (before the entire call is reverted) * Note that in order to collect the the success/failure of the target call, it must be executed * with trace enabled to track the emitted events. * @param op the UserOperation to simulate * @param target if nonzero, a target address to call after userop simulation. If called, the targetSuccess and targetResult * are set to the return from that call. * @param targetCallData callData to pass to target address */ function simulateHandleOp(UserOperation calldata op, address target, bytes calldata targetCallData) external; }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.12; /** * 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,staked, stake) fit into one cell (used during handleOps) * and the rest fit into a 2nd cell. * 112 bit allows for 10^15 eth * 48 bit for full timestamp * 32 bit allows 150 years for unstake delay */ struct DepositInfo { uint112 deposit; bool staked; uint112 stake; uint32 unstakeDelaySec; uint48 withdrawTime; } //API struct used by getStakeInfo and simulateValidation struct StakeInfo { uint256 stake; uint256 unstakeDelaySec; } /// @return info - full deposit information of given account function getDepositInfo(address account) external view returns (DepositInfo memory info); /// @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 */ 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.8.12; /* solhint-disable no-inline-assembly */ /** * 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 callGasLimit the gas limit passed to the callData method call. * @param verificationGasLimit gas used for validateUserOp and validatePaymasterUserOp. * @param preVerificationGas gas not calculated by the handleOps method, but added to the gas paid. Covers batch overhead. * @param maxFeePerGas same as EIP-1559 gas parameter. * @param maxPriorityFeePerGas same as EIP-1559 gas parameter. * @param paymasterAndData if set, this field holds the paymaster address and paymaster-specific 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 UserOperation { address sender; uint256 nonce; bytes initCode; bytes callData; uint256 callGasLimit; uint256 verificationGasLimit; uint256 preVerificationGas; uint256 maxFeePerGas; uint256 maxPriorityFeePerGas; bytes paymasterAndData; bytes signature; } /** * Utility functions helpful when working with UserOperation structs. */ library UserOperationLib { function getSender(UserOperation 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. function gasPrice(UserOperation calldata userOp) internal view returns (uint256) { unchecked { uint256 maxFeePerGas = userOp.maxFeePerGas; uint256 maxPriorityFeePerGas = userOp.maxPriorityFeePerGas; if (maxFeePerGas == maxPriorityFeePerGas) { //legacy mode (for networks that don't support basefee opcode) return maxFeePerGas; } return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee); } } function pack(UserOperation calldata userOp) internal pure returns (bytes memory ret) { //lighter signature scheme. must match UserOp.ts#packUserOp bytes calldata sig = userOp.signature; // copy directly the userOp from calldata up to (but not including) the signature. // this encoding depends on the ABI encoding of calldata, but is much lighter to copy // than referencing each field separately. assembly { let ofs := userOp let len := sub(sub(sig.offset, ofs), 32) ret := mload(0x40) mstore(0x40, add(ret, add(len, 32))) mstore(ret, len) calldatacopy(add(ret, 32), ofs, len) } } function hash(UserOperation calldata userOp) internal pure returns (bytes32) { return keccak256(pack(userOp)); } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; /// @title Enum - Collection of enums /// @author Richard Meissner - <[email protected]> contract Enum { enum Operation {Call, DelegateCall} }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; /** Note: The ERC-165 identifier for this interface is 0x4e2312e0. */ interface ERC1155TokenReceiver { /** @notice Handle the receipt of a single ERC1155 token type. @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated. This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61) if it accepts the transfer. This function MUST revert if it rejects the transfer. Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller. @param _operator The address which initiated the transfer (i.e. msg.sender) @param _from The address which previously owned the token @param _id The ID of the token being transferred @param _value The amount of tokens being transferred @param _data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` */ function onERC1155Received( address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data ) external returns (bytes4); /** @notice Handle the receipt of multiple ERC1155 token types. @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated. This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81) if it accepts the transfer(s). This function MUST revert if it rejects the transfer(s). Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller. @param _operator The address which initiated the batch transfer (i.e. msg.sender) @param _from The address which previously owned the token @param _ids An array containing ids of each token being transferred (order and length must match _values array) @param _values An array containing amounts of each token being transferred (order and length must match _ids array) @param _data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` */ function onERC1155BatchReceived( address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data ) external returns (bytes4); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; /// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02. interface ERC721TokenReceiver { /// @notice Handle the receipt of an NFT /// @dev The ERC721 smart contract calls this function on the recipient /// after a `transfer`. This function MAY throw to revert and reject the /// transfer. Return of other than the magic value MUST result in the /// transaction being reverted. /// Note: the contract address is always the message sender. /// @param _operator The address which called `safeTransferFrom` function /// @param _from The address which previously owned the token /// @param _tokenId The NFT identifier which is being transferred /// @param _data Additional data with no specified format /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` /// unless throwing function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes calldata _data ) external returns (bytes4); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; interface ERC777TokensRecipient { function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @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, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode 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 {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] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { 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); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode 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 {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); 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] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); 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. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // 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); } // 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); } return (signer, RecoverError.NoError); } /** * @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) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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 up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (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; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) 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. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 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. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); 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 (rounding == Rounding.Up && 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 down. * * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(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) { 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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); 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 keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { pop( staticcall( gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0 ) ) } } function _castToPure( function(bytes memory) internal view fnIn ) internal pure returns (function(bytes memory) pure fnOut) { assembly { fnOut := fnIn } } function _sendLogPayload(bytes memory payload) internal pure { _castToPure(_sendLogPayloadImplementation)(payload); } function log() internal pure { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@account-abstraction/contracts/core/BaseAccount.sol"; /** * @dev This contract provides the basic logic for implementing the ERC4337 IAccount interface */ abstract contract Account is BaseAccount { // magic value indicating successfull EIP1271 signature validation. bytes4 private constant EIP1271_MAGICVALUE = 0x1626ba7e; // return value in case of signature validation success, with no time-range. uint256 private constant SIG_VALIDATION_SUCCEEDED = 0; uint256 private _nonce = 0; /** * @dev Hard-code the ERC4337 entry point contract address for gas efficiency */ IEntryPoint private constant _entryPoint = IEntryPoint(0x0576a174D229E3cFA37253523E645A78A0C91B57); /// @inheritdoc BaseAccount function nonce() public view virtual override returns (uint256) { return _nonce; } /// @inheritdoc BaseAccount function entryPoint() public view virtual override returns (IEntryPoint) { return _entryPoint; } /** * @dev Check if the signature is valid for this user operation. Child contracts can override this function to provide a different signature validation logic. * @param userOp The user operation, including the signature field * @param userOpHash The hash of the user operation to check the signature against (also hashes the entry point and chain id) * @return validationData Signature validation result and validity time-range * <20-byte> sigAuthorizer - 0 for valid signature, 1 to mark signature failure, * otherwise, an address of an "authorizer" contract. * <6-byte> validUntil - last timestamp this operation is valid. 0 for "indefinite" * <6-byte> validAfter - first timestamp this operation is valid * If the account doesn't use time-range, it is enough to return SIG_VALIDATION_FAILED value (1) for signature failure. * Note that the validation code cannot use block.timestamp (or block.number) directly. */ function _validateSignature( UserOperation calldata userOp, bytes32 userOpHash ) internal view virtual override returns (uint256 validationData) { bytes32 hash = ECDSA.toEthSignedMessageHash(userOpHash); if (isValidSignature(hash, userOp.signature) != EIP1271_MAGICVALUE) { return SIG_VALIDATION_FAILED; } return SIG_VALIDATION_SUCCEEDED; } function isValidSignature( bytes32 hash, bytes memory signature ) public view virtual returns (bytes4 magicValue); /** * @dev Validate the current nonce matches the UserOperation nonce, then increment nonce to prevent replay of this user operation. * Called only if initCode is empty (since "nonce" field is used as "salt" on account creation) * @param userOp The user operation to validate. */ function _validateAndUpdateNonce( UserOperation calldata userOp ) internal virtual override { require(_nonce++ == userOp.nonce, "Invalid nonce"); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "hardhat/console.sol"; import "../libraries/WriteOnce.sol"; contract ImmutableStorage { /** * @return The address the data is written to */ function storageLocation() internal view returns (address) { // calculates the address of the contract created through the first create() call made by this contract // see: https://ethereum.stackexchange.com/a/761 return address( uint160( uint256( keccak256( abi.encodePacked( bytes1(0xd6), bytes1(0x94), address(this), bytes1(0x01) // contracts start with nonce 1 (EIP-161) ) ) ) ) ); } /** * Stores `data` and validates that it's written to the expected storage location * @param data to be written */ function writeImmutable(bytes memory data) internal { bytes memory initCode = WriteOnce.creationCodeFor(data); address createdAt; // Deploy contract using create assembly { createdAt := create(0, add(initCode, 32), mload(initCode)) } require(createdAt == storageLocation(), "Write failed"); } /** * Reads the code at the storage location as data * @return data stored at the storage location */ function readImmutable() internal view returns (bytes memory) { return WriteOnce.valueStoredAt(storageLocation()); } }
//SPDX-License-Identifier: LGPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@gnosis.pm/safe-contracts/contracts/common/Enum.sol"; import "./Receiver.sol"; import "./Account.sol"; import "../interfaces/IMech.sol"; /** * @dev This contract implements the authorization and signature validation for a mech. It's unopinionated about what it means to hold a mech. Child contract must define that by implementing the `isOperator` function. */ abstract contract Mech is IMech, Account, Receiver { // bytes4(keccak256("isValidSignature(bytes32,bytes)") bytes4 internal constant EIP1271_MAGICVALUE = 0x1626ba7e; /** * @dev Modifier to make a function callable only by the mech operator or the ERC4337 entry point contract */ modifier onlyOperator() { require( isOperator(msg.sender) || msg.sender == address(entryPoint()), "Only callable by the mech operator or the entry point contract" ); _; } /** * @dev Return if the passed address is authorized to sign on behalf of the mech, must be implemented by the child contract * @param signer The address to check */ function isOperator(address signer) public view virtual returns (bool); /** * @dev Checks whether the signature provided is valid for the provided hash, complies with EIP-1271. A signature is valid if either: * - It's a valid ECDSA signature by the mech operator * - It's a valid EIP-1271 signature by the mech operator * - It's a valid EIP-1271 signature by the mech itself * @param hash Hash of the data (could be either a message hash or transaction hash) * @param signature Signature to validate. Can be an ECDSA signature or a EIP-1271 contract signature (identified by v=0) */ function isValidSignature( bytes32 hash, bytes memory signature ) public view override(IERC1271, Account) returns (bytes4 magicValue) { bytes32 r; bytes32 s; uint8 v; (v, r, s) = _splitSignature(signature); if (v == 0) { // This is an EIP-1271 contract signature // The address of the contract is encoded into r address signingContract = address(uint160(uint256(r))); // The signature data to pass for validation to the contract is appended to the signature and the offset is stored in s bytes memory contractSignature; // solhint-disable-next-line no-inline-assembly assembly { contractSignature := add(add(signature, s), 0x20) // add 0x20 to skip over the length of the bytes array } // if it's our own signature, we recursively check if it's valid if ( !isOperator(signingContract) && signingContract != address(this) ) { return 0xffffffff; } return IERC1271(signingContract).isValidSignature( hash, contractSignature ); } else { // This is an ECDSA signature if (isOperator(ECDSA.recover(hash, v, r, s))) { return EIP1271_MAGICVALUE; } } return 0xffffffff; } /// @dev Executes either a delegatecall or a call with provided parameters /// @param to Destination address. /// @param value Ether value. /// @param data Data payload. /// @param operation Operation type. /// @param txGas Gas to send for executing the meta transaction /// @return success boolean flag indicating if the call succeeded function _exec( address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 txGas ) internal returns (bool success, bytes memory returnData) { if (operation == Enum.Operation.DelegateCall) { (success, returnData) = to.delegatecall{gas: txGas}(data); } else { (success, returnData) = to.call{gas: txGas, value: value}(data); } } /// @dev Allows the mech operator to execute arbitrary transactions /// @param to Destination address of transaction. /// @param value Ether value of transaction. /// @param data Data payload of transaction. /// @param operation Operation type of transaction. /// @param txGas Gas to send for executing the meta transaction, if 0 all left will be sent /// @return returnData Return data of the call function exec( address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 txGas ) public onlyOperator returns (bytes memory returnData) { bool success; (success, returnData) = _exec( to, value, data, operation, txGas == 0 ? gasleft() : txGas ); if (!success) { // solhint-disable-next-line no-inline-assembly assembly { revert(add(returnData, 0x20), mload(returnData)) } } } /** * @dev Divides bytes signature into `uint8 v, bytes32 r, bytes32 s`. * @param signature The signature bytes */ function _splitSignature( bytes memory signature ) internal pure returns (uint8 v, bytes32 r, bytes32 s) { // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded to 32 bytes. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.12; import "@gnosis.pm/safe-contracts/contracts/interfaces/ERC721TokenReceiver.sol"; import "@gnosis.pm/safe-contracts/contracts/interfaces/ERC1155TokenReceiver.sol"; import "@gnosis.pm/safe-contracts/contracts/interfaces/ERC777TokensRecipient.sol"; /** * @dev This contract implements the functions necessary to receive ether as well as ERC721, ERC1155 and ERC777 tokens. */ contract Receiver is ERC1155TokenReceiver, ERC777TokensRecipient, ERC721TokenReceiver { receive() external payable {} function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external pure override returns (bytes4) { return 0xf23a6e61; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external pure override returns (bytes4) { return 0xbc197c81; } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return 0x150b7a02; } function tokensReceived( address, address, address, uint256, bytes calldata, bytes calldata ) external pure override { // for ERC-777 compatibility } }
//SPDX-License-Identifier: LGPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./base/Mech.sol"; import "./base/ImmutableStorage.sol"; /** * @dev A Mech that is operated by the holder of an ERC721 non-fungible token */ contract ERC721Mech is Mech, ImmutableStorage { /// @param _token Address of the token contract /// @param _tokenId The token ID constructor(address _token, uint256 _tokenId) { bytes memory initParams = abi.encode(_token, _tokenId); setUp(initParams); } function setUp(bytes memory initParams) public override { require(readImmutable().length == 0, "Already initialized"); writeImmutable(initParams); } function token() public view returns (IERC721) { address _token = abi.decode(readImmutable(), (address)); return IERC721(_token); } function tokenId() public view returns (uint256) { (, uint256 _tokenId) = abi.decode(readImmutable(), (address, uint256)); return _tokenId; } function isOperator(address signer) public view override returns (bool) { (address _token, uint256 _tokenId) = abi.decode( readImmutable(), (address, uint256) ); return IERC721(_token).ownerOf(_tokenId) == signer; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.12; /// @dev Interface for contracts that can be used as master copies for minimal proxies deployed through Zodiac's ModuleProxyFactory interface IFactoryFriendly { function setUp(bytes memory initializeParams) external; }
//SPDX-License-Identifier: LGPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/interfaces/IERC1271.sol"; import "@gnosis.pm/safe-contracts/contracts/common/Enum.sol"; import "@account-abstraction/contracts/interfaces/IAccount.sol"; import "./IFactoryFriendly.sol"; interface IMech is IAccount, IERC1271, IFactoryFriendly { /// @dev Executes either a delegatecall or a call with provided parameters /// @param to Destination address. /// @param value Ether value. /// @param data Data payload. /// @param operation Operation type. /// @param txGas Gas to send for executing the meta transaction, if 0 all left will be sent /// @return returnData bytes The return data of the call function exec( address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 txGas ) external returns (bytes memory returnData); }
// SPDX-License-Identifier: MIT // Forked from https://github.com/0xsequence/sstore2/blob/master/contracts/utils/Bytecode.sol // MIT License // Copyright (c) [2018] [Ismael Ramos Silvan] // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pragma solidity ^0.8.12; library WriteOnce { /** * @notice Generate a creation code that results on a contract with `00${_value}` as bytecode * @param data The value to store in the bytecode * @return creationCode (constructor) for new contract */ function creationCodeFor( bytes memory data ) internal pure returns (bytes memory) { /* 0x00 0x63 0x63XXXXXX PUSH4 _value.length size 0x01 0x80 0x80 DUP1 size size 0x02 0x60 0x600e PUSH1 14 14 size size 0x03 0x60 0x6000 PUSH1 00 0 14 size size 0x04 0x39 0x39 CODECOPY size 0x05 0x60 0x6000 PUSH1 00 0 size 0x06 0xf3 0xf3 RETURN <CODE> */ // Prepend 00 so the created contract can't be called return abi.encodePacked( hex"63", uint32(data.length + 1), hex"80_60_0E_60_00_39_60_00_F3", hex"00", data ); } /** * @notice Returns the size of the code on a given address * @param _addr Address that may or may not contain code * @return size of the code on the given `_addr` */ function codeSize(address _addr) internal view returns (uint256 size) { assembly { size := extcodesize(_addr) } } /** * @notice Returns the value stored in the bytecode of the given address * @param _addr Address that may or may not contain code * @return _value The value stored in the bytecode of the given address * * Forked from: https://gist.github.com/KardanovIR/fe98661df9338c842b4a30306d507fbd **/ function valueStoredAt( address _addr ) internal view returns (bytes memory _value) { uint256 size = codeSize(_addr); if (size <= 1) return bytes(""); size--; // remove 00 byte we prepend when writing unchecked { assembly { // allocate output byte array - this could also be done without assembly // by using o_code = new bytes(size) _value := mload(0x40) // new "memory end" including padding mstore( 0x40, add(_value, and(add(add(size, 0x20), 0x1f), not(0x1f))) ) // store length in memory mstore(_value, size) // actually retrieve the code, this needs assembly // start at offset 1 to skip over 00 byte we prepend when writing extcodecopy(_addr, add(_value, 0x20), 1, size) } } } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "evmVersion": "cancun", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"_mechMarketplace","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"agentId","type":"uint256"}],"name":"AgentNotFound","type":"error"},{"inputs":[{"internalType":"address","name":"mechMarketplace","type":"address"}],"name":"MarketplaceExists","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"manager","type":"address"}],"name":"MarketplaceOnly","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"NotEnoughPaid","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"Overflow","type":"error"},{"inputs":[],"name":"ReentrancyGuard","type":"error"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"RequestIdNotFound","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Deliver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mechMarketplace","type":"address"}],"name":"MechMarketplaceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"PriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Request","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"RevokeRequest","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR_TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"deliver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"mechStakingInstance","type":"address"},{"internalType":"uint256","name":"mechServiceId","type":"uint256"}],"name":"deliverToMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entryPoint","outputs":[{"internalType":"contract IEntryPoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"txGas","type":"uint256"}],"name":"exec","outputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getDeliveriesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"getRequestId","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"getRequestStatus","outputs":[{"internalType":"enum AgentMech.RequestStatus","name":"status","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getRequestsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"getUndeliveredRequestIds","outputs":[{"internalType":"uint256[]","name":"requestIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapDeliveryCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mapRequestAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapRequestCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mapRequestIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapUndeliveredRequestsCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mechMarketplace","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numTotalDeliveries","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numTotalRequests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numUndeliveredRequests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"request","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"requestFromMarketplace","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"revokeRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"initParams","type":"bytes"}],"name":"setUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"pure","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":"uint256","name":"callGasLimit","type":"uint256"},{"internalType":"uint256","name":"verificationGasLimit","type":"uint256"},{"internalType":"uint256","name":"preVerificationGas","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"bytes","name":"paymasterAndData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct UserOperation","name":"userOp","type":"tuple"},{"internalType":"bytes32","name":"userOpHash","type":"bytes32"},{"internalType":"uint256","name":"missingAccountFunds","type":"uint256"}],"name":"validateUserOp","outputs":[{"internalType":"uint256","name":"validationData","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040525f5f556001600655348015610017575f5ffd5b5060405161376d38038061376d83398101604081905261003691610469565b604080516001600160a01b038616602082015280820185905281518082038301815260609091019091528490849061006d8161016b565b5050506001600160a01b0384166100975760405163d92e233d60e01b815260040160405180910390fd5b6040516331a9108f60e11b8152600481018490525f906001600160a01b03861690636352211e90602401602060405180830381865afa1580156100dc573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061010091906104ad565b90506001600160a01b03811661013157604051630ede975960e01b8152600481018590526024015b60405180910390fd5b600580546001600160a01b0319166001600160a01b03841617905560018390554660a05261015d6101cd565b608052506105959350505050565b610173610295565b51156101c15760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610128565b6101ca816102fd565b50565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d093525604051806040016040528060058152602001640312e312e360dc1b81525060405160200161023e91906104cd565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60606102f86102f3604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201525f90603701604051602081830303815290604052805190602001205f1c905090565b6103c1565b905090565b5f61030782610416565b90505f8151602083015ff0905061036d604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201525f90603701604051602081830303815290604052805190602001205f1c905090565b6001600160a01b0316816001600160a01b0316146103bc5760405162461bcd60e51b815260206004820152600c60248201526b15dc9a5d194819985a5b195960a21b6044820152606401610128565b505050565b6060813b600181116103e257505060408051602081019091525f8152919050565b806103ec81610516565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b606081516001610426919061052b565b82604051602001610438929190610544565b6040516020818303038152906040529050919050565b80516001600160a01b0381168114610464575f5ffd5b919050565b5f5f5f5f6080858703121561047c575f5ffd5b6104858561044e565b60208601516040870151919550935091506104a26060860161044e565b905092959194509250565b5f602082840312156104bd575f5ffd5b6104c68261044e565b9392505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52601160045260245ffd5b5f8161052457610524610502565b505f190190565b8082018082111561053e5761053e610502565b92915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201525f600e820181905282518060208501600f85015e5f9201600f019182525092915050565b60805160a0516131a96105c45f395f81816105ab015261172a01525f81816108cd015261175f01526131a95ff3fe6080604052600436106102ac575f3560e01c8063a035b1fe11610165578063d843b7f4116100c6578063f5dcb7bb1161007c578063f698da2511610062578063f698da25146108bc578063fc0c546a146108ef578063ffa1ad7414610903575f5ffd5b8063f5dcb7bb1461086a578063f6171e441461089d575f5ffd5b8063e7d915cf116100ac578063e7d915cf146107f2578063ed24911d14610811578063f23a6e6114610825575f5ffd5b8063d843b7f414610785578063d8a4676f146107c6575f5ffd5b8063b94207d31161011b578063bdf8631711610101578063bdf8631714610719578063c7dec3fc1461072e578063cbd6407a1461075a575f5ffd5b8063b94207d3146106bf578063bc197c81146106d2575f5ffd5b8063a669aaf91161014b578063a669aaf914610671578063affed0e014610686578063b0d691fe14610699575f5ffd5b8063a035b1fe1461063d578063a4f9edbf14610652575f5ffd5b806358ce09091161020f57806391b7f5ed116101c55780639a8a0592116101ab5780639a8a05921461059a5780639c5e9590146105cd5780639ec4a5bf1461061e575f5ffd5b806391b7f5ed14610550578063982c0db31461056f575f5ffd5b806379412518116101f557806379412518146104bb5780637af73473146104ce5780638fb847ef1461050f575f5ffd5b806358ce0909146104605780636d70f7ae1461048c575f5ffd5b806317d70f7c116102645780633a871cdd1161024a5780633a871cdd1461040d5780634954bbf11461042c5780634ada3e611461044b575f5ffd5b806317d70f7c146103ce5780631bbbeeb8146103e2575f5ffd5b8063150b7a0211610294578063150b7a021461031b578063157305fe146103905780631626ba7e146103af575f5ffd5b806223de29146102b7578062427c54146102dd575f5ffd5b366102b357005b5f5ffd5b3480156102c2575f5ffd5b506102db6102d1366004612748565b5050505050505050565b005b3480156102e8575f5ffd5b506103086102f73660046127f7565b60086020525f908152604090205481565b6040519081526020015b60405180910390f35b348015610326575f5ffd5b5061035f610335366004612812565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610312565b34801561039b575f5ffd5b506102db6103aa366004612956565b61094b565b3480156103ba575f5ffd5b5061035f6103c9366004612956565b610ac5565b3480156103d9575f5ffd5b50610308610c68565b3480156103ed575f5ffd5b506103086103fc3660046127f7565b60076020525f908152604090205481565b348015610418575f5ffd5b5061030861042736600461299a565b610c8c565b348015610437575f5ffd5b506102db6104463660046129e9565b610cc8565b348015610456575f5ffd5b5061030860035481565b34801561046b575f5ffd5b5061047f61047a366004612a46565b610eb7565b6040516103129190612a66565b348015610497575f5ffd5b506104ab6104a63660046127f7565b61100e565b6040519015158152602001610312565b6102db6104c9366004612aa8565b6110e0565b3480156104d9575f5ffd5b506103086104e83660046127f7565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b34801561051a575f5ffd5b506103086105293660046127f7565b73ffffffffffffffffffffffffffffffffffffffff165f9081526008602052604090205490565b34801561055b575f5ffd5b506102db61056a366004612afe565b611163565b34801561057a575f5ffd5b506103086105893660046127f7565b60096020525f908152604090205481565b3480156105a5575f5ffd5b506103087f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d8575f5ffd5b506005546105f99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610312565b348015610629575f5ffd5b50610308610638366004612aa8565b611251565b348015610648575f5ffd5b5061030860015481565b34801561065d575f5ffd5b506102db61066c366004612b15565b611305565b34801561067c575f5ffd5b5061030860045481565b348015610691575f5ffd5b505f54610308565b3480156106a4575f5ffd5b50730576a174d229e3cfa37253523e645a78a0c91b576105f9565b6103086106cd366004612b15565b611381565b3480156106dd575f5ffd5b5061035f6106ec366004612b90565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b348015610724575f5ffd5b5061030860025481565b348015610739575f5ffd5b5061074d610748366004612c33565b61143c565b6040516103129190612cf1565b348015610765575f5ffd5b506103086107743660046127f7565b600c6020525f908152604090205481565b348015610790575f5ffd5b506105f961079f366004612afe565b600b6020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156107d1575f5ffd5b506107e56107e0366004612afe565b611526565b6040516103129190612d30565b3480156107fd575f5ffd5b506102db61080c366004612afe565b6115fb565b34801561081c575f5ffd5b50610308611727565b348015610830575f5ffd5b5061035f61083f366004612d6f565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b348015610875575f5ffd5b506103087f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b3480156108a8575f5ffd5b506103086108b7366004612a46565b611781565b3480156108c7575f5ffd5b506103087f000000000000000000000000000000000000000000000000000000000000000081565b3480156108fa575f5ffd5b506105f96117a3565b34801561090e575f5ffd5b5061074d6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b6109543361100e565b80610972575033730576a174d229e3cfa37253523e645a78a0c91b57145b610a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b60016006541115610a40576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260065560055473ffffffffffffffffffffffffffffffffffffffff1615610ab1576005546040517f4b6c692700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109fa565b610abb82826117c0565b5050600160065550565b5f5f5f5f610ae585602081015160408201516060909201515f1a92909190565b9094509250905060ff81165f03610bfb5782858301602001610b068261100e565b158015610b29575073ffffffffffffffffffffffffffffffffffffffff82163014155b15610b5c57507fffffffff000000000000000000000000000000000000000000000000000000009450610c629350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e90610bb0908b908590600401612de6565b602060405180830381865afa158015610bcb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bef9190612dfe565b95505050505050610c62565b610c0a6104a6878386866119d5565b15610c3b57507f1626ba7e000000000000000000000000000000000000000000000000000000009250610c62915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b5f5f610c726119f1565b806020019051810190610c859190612e3d565b9392505050565b5f610c95611ac0565b610c9f8484611b3f565b9050610cae6040850185612e69565b90505f03610cbf57610cbf84611c13565b610c8582611c91565b610cd13361100e565b80610cef575033730576a174d229e3cfa37253523e645a78a0c91b57145b610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b60016006541115610db8576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260065560055473ffffffffffffffffffffffffffffffffffffffff16610e0c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e1785856117c0565b805190915015610eab576005546040517f56d0819e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906356d0819e90610e7d908890859088908890600401612eca565b5f604051808303815f87803b158015610e94575f5ffd5b505af1158015610ea6573d5f5f3e3d5ffd5b505050505b50506001600655505050565b6002546060905f849003610ec9578093505b80610ed48486612f38565b1115610f2157610ee48385612f38565b6040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016109fa565b8315611007578367ffffffffffffffff811115610f4057610f40612880565b604051908082528060200260200182016040528015610f69578160200160208202803683370190505b505f808052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e4549193505b84811015610fbc575f828152600a60205260409020600101549150600101610f99565b505f5b858110156110045781848281518110610fda57610fda612f4b565b6020908102919091018101919091525f838152600a90915260409020600101549150600101610fbf565b50505b5092915050565b5f5f5f6110196119f1565b80602001905181019061102c9190612e3d565b915091508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161108291815260200190565b602060405180830381865afa15801561109d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c19190612f78565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b60055473ffffffffffffffffffffffffffffffffffffffff163314611153576005546040517fe56895c000000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016109fa565b61115e838383611d05565b505050565b61116c3361100e565b8061118a575033730576a174d229e3cfa37253523e645a78a0c91b57145b611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b5f61125a611727565b84848460405160200161126f93929190612f93565b604051602081830303815290604052805190602001206040516020016112c79291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b61130d6119f1565b5115611375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064016109fa565b61137e81611ead565b50565b6005545f9073ffffffffffffffffffffffffffffffffffffffff16156113ef576005546040517f4b6c692700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109fa565b335f818152600c602052604090205461140a91908490611251565b335f908152600c6020526040812080549293509061142783612fd1565b9190505550611437338383611d05565b919050565b60606114473361100e565b80611465575033730576a174d229e3cfa37253523e645a78a0c91b57145b6114f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b5f61150b878787878715611505578761201d565b5a61201d565b925090508061151c57815160208301fd5b5095945050505050565b5f818152600b602052604081205473ffffffffffffffffffffffffffffffffffffffff1615611437575f828152600a60205260408082208151808301928390529160029082845b81548152602001906001019080831161156d5750505050509050805f6002811061159957611599612f4b565b60200201511580156115ad57506020810151155b80156115e257505f8052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3548314155b156115f057600291506115f5565b600191505b50919050565b60055473ffffffffffffffffffffffffffffffffffffffff16331461166e576005546040517fe56895c000000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016109fa565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16806116c9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116d38183612120565b8073ffffffffffffffffffffffffffffffffffffffff167fa36a540c5fea3a5e69d4b1c2247b28a93fd183ef1314af26a8db7b3ae080bcd08360405161171b91815260200190565b60405180910390a25050565b5f7f0000000000000000000000000000000000000000000000000000000000000000461461175c57611757612273565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b600a602052815f5260405f20816002811061179a575f80fd5b01549150829050565b5f5f6117ad6119f1565b806020019051810190610c629190612f78565b5f828152600b60205260408082205460055491517ff2e433bf0000000000000000000000000000000000000000000000000000000081526004810186905260609373ffffffffffffffffffffffffffffffffffffffff928316939092169063f2e433bf906024016080604051808303815f875af1158015611843573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118679190613008565b602081015190915073ffffffffffffffffffffffffffffffffffffffff1615611891575050610c62565b73ffffffffffffffffffffffffffffffffffffffff82166119275760055473ffffffffffffffffffffffffffffffffffffffff16156118d257806040015191505b73ffffffffffffffffffffffffffffffffffffffff8216611922576040517ffe239804000000000000000000000000000000000000000000000000000000008152600481018690526024016109fa565b611931565b6119318286612120565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260086020526040812080548695509161196483612fd1565b909155505060048054905f61197883612fd1565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b7086856040516119c5929190612de6565b60405180910390a2505092915050565b5f5f5f6119e487878787612371565b9150915061151c81612459565b6060611757611abb6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b61260b565b33730576a174d229e3cfa37253523e645a78a0c91b5714611b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016109fa565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c829052603c81207f1626ba7e00000000000000000000000000000000000000000000000000000000611bd982611ba0610140880188612e69565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610ac592505050565b7fffffffff000000000000000000000000000000000000000000000000000000001614611c0a576001915050610c62565b505f9392505050565b5f805460208301359180611c2683612fd1565b919050551461137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016109fa565b801561137e576040515f9033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d805f8114611cf9576040519150601f19603f3d011682016040523d82523d5f602084013e611cfe565b606091505b5050505050565b611d10348284612660565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600760205260408120805491611d4083612fd1565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f908152600960205260408120805491611d7583612fd1565b90915550505f818152600b6020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8816179055600a9091528082207f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e480546001830181905590859055808452918320849055600280547f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e394929392909190611e3c83612fd1565b909155505060038054905f611e5083612fd1565b91905055508573ffffffffffffffffffffffffffffffffffffffff167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc8587604051611e9d929190612de6565b60405180910390a2505050505050565b5f611eb7826126aa565b90505f8151602083015ff09050611f896040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461115e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c6564000000000000000000000000000000000000000060448201526064016109fa565b5f6060600184600181111561203457612034612d03565b036120a8578673ffffffffffffffffffffffffffffffffffffffff16838660405161205f91906130ac565b5f604051808303818686f4925050503d805f8114612098576040519150601f19603f3d011682016040523d82523d5f602084013e61209d565b606091505b509092509050612116565b8673ffffffffffffffffffffffffffffffffffffffff168387876040516120cf91906130ac565b5f60405180830381858888f193505050503d805f811461210a576040519150601f19603f3d011682016040523d82523d5f602084013e61210f565b606091505b5090925090505b9550959350505050565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600960205260408120805491612150836130b7565b909155505060028054905f612164836130b7565b90915550505f818152600a60205260408082208151808301928390529160029082845b8154815260200190600101908083116121875750505050509050805f600281106121b3576121b3612f4b565b60200201511580156121c757506020810151155b80156121fc57505f8052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3548214155b15612236576040517ffe239804000000000000000000000000000000000000000000000000000000008152600481018390526024016109fa565b6020818101805183515f908152600a9093526040808420600190810192909255935191518352838320919091559281529081208181559091015550565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e312e300000000000000000000000000000000000000000000000000000008152506040516020016122fc9190612cf1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123a657505f90506003612450565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156123f7573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661244a575f60019250925050612450565b91505f90505b94509492505050565b5f81600481111561246c5761246c612d03565b036124745750565b600181600481111561248857612488612d03565b036124ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109fa565b600281600481111561250357612503612d03565b0361256a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109fa565b600381600481111561257e5761257e612d03565b0361137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016109fa565b6060813b6001811161262c57505060408051602081019091525f8152919050565b80612636816130b7565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b60015483101561115e576001546040517fb48978280000000000000000000000000000000000000000000000000000000081526109fa918591600401918252602082015260400190565b6060815160016126ba9190612f38565b826040516020016126cc9291906130eb565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461137e575f5ffd5b5f5f83601f840112612713575f5ffd5b50813567ffffffffffffffff81111561272a575f5ffd5b602083019150836020828501011115612741575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60c0898b03121561275f575f5ffd5b883561276a816126e2565b9750602089013561277a816126e2565b9650604089013561278a816126e2565b955060608901359450608089013567ffffffffffffffff8111156127ac575f5ffd5b6127b88b828c01612703565b90955093505060a089013567ffffffffffffffff8111156127d7575f5ffd5b6127e38b828c01612703565b999c989b5096995094979396929594505050565b5f60208284031215612807575f5ffd5b8135610c85816126e2565b5f5f5f5f5f60808688031215612826575f5ffd5b8535612831816126e2565b94506020860135612841816126e2565b935060408601359250606086013567ffffffffffffffff811115612863575f5ffd5b61286f88828901612703565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126128bc575f5ffd5b813567ffffffffffffffff8111156128d6576128d6612880565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561292357612923612880565b60405281815283820160200185101561293a575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f60408385031215612967575f5ffd5b82359150602083013567ffffffffffffffff811115612984575f5ffd5b612990858286016128ad565b9150509250929050565b5f5f5f606084860312156129ac575f5ffd5b833567ffffffffffffffff8111156129c2575f5ffd5b840161016081870312156129d4575f5ffd5b95602085013595506040909401359392505050565b5f5f5f5f608085870312156129fc575f5ffd5b84359350602085013567ffffffffffffffff811115612a19575f5ffd5b612a25878288016128ad565b9350506040850135612a36816126e2565b9396929550929360600135925050565b5f5f60408385031215612a57575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b81811015612a9d578351835260209384019390920191600101612a7f565b509095945050505050565b5f5f5f60608486031215612aba575f5ffd5b8335612ac5816126e2565b9250602084013567ffffffffffffffff811115612ae0575f5ffd5b612aec868287016128ad565b93969395505050506040919091013590565b5f60208284031215612b0e575f5ffd5b5035919050565b5f60208284031215612b25575f5ffd5b813567ffffffffffffffff811115612b3b575f5ffd5b612b47848285016128ad565b949350505050565b5f5f83601f840112612b5f575f5ffd5b50813567ffffffffffffffff811115612b76575f5ffd5b6020830191508360208260051b8501011115612741575f5ffd5b5f5f5f5f5f5f5f5f60a0898b031215612ba7575f5ffd5b8835612bb2816126e2565b97506020890135612bc2816126e2565b9650604089013567ffffffffffffffff811115612bdd575f5ffd5b612be98b828c01612b4f565b909750955050606089013567ffffffffffffffff811115612c08575f5ffd5b612c148b828c01612b4f565b909550935050608089013567ffffffffffffffff8111156127d7575f5ffd5b5f5f5f5f5f60a08688031215612c47575f5ffd5b8535612c52816126e2565b945060208601359350604086013567ffffffffffffffff811115612c74575f5ffd5b612c80888289016128ad565b935050606086013560028110612c94575f5ffd5b949793965091946080013592915050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610c856020830184612ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6020810160038310612d69577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f5f5f5f5f5f60a08789031215612d84575f5ffd5b8635612d8f816126e2565b95506020870135612d9f816126e2565b94506040870135935060608701359250608087013567ffffffffffffffff811115612dc8575f5ffd5b612dd489828a01612703565b979a9699509497509295939492505050565b828152604060208201525f612b476040830184612ca5565b5f60208284031215612e0e575f5ffd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c85575f5ffd5b5f5f60408385031215612e4e575f5ffd5b8251612e59816126e2565b6020939093015192949293505050565b5f5f83357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e9c575f5ffd5b83018035915067ffffffffffffffff821115612eb6575f5ffd5b602001915036819003821315612741575f5ffd5b848152608060208201525f612ee26080830186612ca5565b73ffffffffffffffffffffffffffffffffffffffff949094166040830152506060015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610c6257610c62612f0b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612f88575f5ffd5b8151610c85816126e2565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f612fc16060830185612ca5565b9050826040830152949350505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361300157613001612f0b565b5060010190565b5f6080828403128015613019575f5ffd5b506040516080810167ffffffffffffffff8111828210171561303d5761303d612880565b604052825161304b816126e2565b8152602083015161305b816126e2565b6020820152604083015161306e816126e2565b6040820152606083015163ffffffff81168114613089575f5ffd5b60608201529392505050565b5f81518060208401855e5f93019283525090919050565b5f610c858284613095565b5f816130c5576130c5612f0b565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201525f600e8201525f612b47600f83018461309556fea2646970667358221220704524f95757c94019cddad03ecfec4f1e3e0d509ed6ce5bc971e103a7b7c95664736f6c634300081c0033000000000000000000000000e49cb081e8d96920c38aa7ab90cb0294ab4bc8ea0000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000004554fe75c1f5576c1d7f765b2a036c199adae329
Deployed Bytecode
0x6080604052600436106102ac575f3560e01c8063a035b1fe11610165578063d843b7f4116100c6578063f5dcb7bb1161007c578063f698da2511610062578063f698da25146108bc578063fc0c546a146108ef578063ffa1ad7414610903575f5ffd5b8063f5dcb7bb1461086a578063f6171e441461089d575f5ffd5b8063e7d915cf116100ac578063e7d915cf146107f2578063ed24911d14610811578063f23a6e6114610825575f5ffd5b8063d843b7f414610785578063d8a4676f146107c6575f5ffd5b8063b94207d31161011b578063bdf8631711610101578063bdf8631714610719578063c7dec3fc1461072e578063cbd6407a1461075a575f5ffd5b8063b94207d3146106bf578063bc197c81146106d2575f5ffd5b8063a669aaf91161014b578063a669aaf914610671578063affed0e014610686578063b0d691fe14610699575f5ffd5b8063a035b1fe1461063d578063a4f9edbf14610652575f5ffd5b806358ce09091161020f57806391b7f5ed116101c55780639a8a0592116101ab5780639a8a05921461059a5780639c5e9590146105cd5780639ec4a5bf1461061e575f5ffd5b806391b7f5ed14610550578063982c0db31461056f575f5ffd5b806379412518116101f557806379412518146104bb5780637af73473146104ce5780638fb847ef1461050f575f5ffd5b806358ce0909146104605780636d70f7ae1461048c575f5ffd5b806317d70f7c116102645780633a871cdd1161024a5780633a871cdd1461040d5780634954bbf11461042c5780634ada3e611461044b575f5ffd5b806317d70f7c146103ce5780631bbbeeb8146103e2575f5ffd5b8063150b7a0211610294578063150b7a021461031b578063157305fe146103905780631626ba7e146103af575f5ffd5b806223de29146102b7578062427c54146102dd575f5ffd5b366102b357005b5f5ffd5b3480156102c2575f5ffd5b506102db6102d1366004612748565b5050505050505050565b005b3480156102e8575f5ffd5b506103086102f73660046127f7565b60086020525f908152604090205481565b6040519081526020015b60405180910390f35b348015610326575f5ffd5b5061035f610335366004612812565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610312565b34801561039b575f5ffd5b506102db6103aa366004612956565b61094b565b3480156103ba575f5ffd5b5061035f6103c9366004612956565b610ac5565b3480156103d9575f5ffd5b50610308610c68565b3480156103ed575f5ffd5b506103086103fc3660046127f7565b60076020525f908152604090205481565b348015610418575f5ffd5b5061030861042736600461299a565b610c8c565b348015610437575f5ffd5b506102db6104463660046129e9565b610cc8565b348015610456575f5ffd5b5061030860035481565b34801561046b575f5ffd5b5061047f61047a366004612a46565b610eb7565b6040516103129190612a66565b348015610497575f5ffd5b506104ab6104a63660046127f7565b61100e565b6040519015158152602001610312565b6102db6104c9366004612aa8565b6110e0565b3480156104d9575f5ffd5b506103086104e83660046127f7565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b34801561051a575f5ffd5b506103086105293660046127f7565b73ffffffffffffffffffffffffffffffffffffffff165f9081526008602052604090205490565b34801561055b575f5ffd5b506102db61056a366004612afe565b611163565b34801561057a575f5ffd5b506103086105893660046127f7565b60096020525f908152604090205481565b3480156105a5575f5ffd5b506103087f000000000000000000000000000000000000000000000000000000000000006481565b3480156105d8575f5ffd5b506005546105f99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610312565b348015610629575f5ffd5b50610308610638366004612aa8565b611251565b348015610648575f5ffd5b5061030860015481565b34801561065d575f5ffd5b506102db61066c366004612b15565b611305565b34801561067c575f5ffd5b5061030860045481565b348015610691575f5ffd5b505f54610308565b3480156106a4575f5ffd5b50730576a174d229e3cfa37253523e645a78a0c91b576105f9565b6103086106cd366004612b15565b611381565b3480156106dd575f5ffd5b5061035f6106ec366004612b90565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b348015610724575f5ffd5b5061030860025481565b348015610739575f5ffd5b5061074d610748366004612c33565b61143c565b6040516103129190612cf1565b348015610765575f5ffd5b506103086107743660046127f7565b600c6020525f908152604090205481565b348015610790575f5ffd5b506105f961079f366004612afe565b600b6020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156107d1575f5ffd5b506107e56107e0366004612afe565b611526565b6040516103129190612d30565b3480156107fd575f5ffd5b506102db61080c366004612afe565b6115fb565b34801561081c575f5ffd5b50610308611727565b348015610830575f5ffd5b5061035f61083f366004612d6f565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b348015610875575f5ffd5b506103087f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b3480156108a8575f5ffd5b506103086108b7366004612a46565b611781565b3480156108c7575f5ffd5b506103087f1af5c84f74cdc97698d3db1fa43580d2ba89cf1906fd807083885530650ec82981565b3480156108fa575f5ffd5b506105f96117a3565b34801561090e575f5ffd5b5061074d6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b6109543361100e565b80610972575033730576a174d229e3cfa37253523e645a78a0c91b57145b610a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b60016006541115610a40576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260065560055473ffffffffffffffffffffffffffffffffffffffff1615610ab1576005546040517f4b6c692700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109fa565b610abb82826117c0565b5050600160065550565b5f5f5f5f610ae585602081015160408201516060909201515f1a92909190565b9094509250905060ff81165f03610bfb5782858301602001610b068261100e565b158015610b29575073ffffffffffffffffffffffffffffffffffffffff82163014155b15610b5c57507fffffffff000000000000000000000000000000000000000000000000000000009450610c629350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e90610bb0908b908590600401612de6565b602060405180830381865afa158015610bcb573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bef9190612dfe565b95505050505050610c62565b610c0a6104a6878386866119d5565b15610c3b57507f1626ba7e000000000000000000000000000000000000000000000000000000009250610c62915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b5f5f610c726119f1565b806020019051810190610c859190612e3d565b9392505050565b5f610c95611ac0565b610c9f8484611b3f565b9050610cae6040850185612e69565b90505f03610cbf57610cbf84611c13565b610c8582611c91565b610cd13361100e565b80610cef575033730576a174d229e3cfa37253523e645a78a0c91b57145b610d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b60016006541115610db8576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260065560055473ffffffffffffffffffffffffffffffffffffffff16610e0c576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610e1785856117c0565b805190915015610eab576005546040517f56d0819e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906356d0819e90610e7d908890859088908890600401612eca565b5f604051808303815f87803b158015610e94575f5ffd5b505af1158015610ea6573d5f5f3e3d5ffd5b505050505b50506001600655505050565b6002546060905f849003610ec9578093505b80610ed48486612f38565b1115610f2157610ee48385612f38565b6040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044016109fa565b8315611007578367ffffffffffffffff811115610f4057610f40612880565b604051908082528060200260200182016040528015610f69578160200160208202803683370190505b505f808052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e4549193505b84811015610fbc575f828152600a60205260409020600101549150600101610f99565b505f5b858110156110045781848281518110610fda57610fda612f4b565b6020908102919091018101919091525f838152600a90915260409020600101549150600101610fbf565b50505b5092915050565b5f5f5f6110196119f1565b80602001905181019061102c9190612e3d565b915091508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161108291815260200190565b602060405180830381865afa15801561109d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110c19190612f78565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b60055473ffffffffffffffffffffffffffffffffffffffff163314611153576005546040517fe56895c000000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016109fa565b61115e838383611d05565b505050565b61116c3361100e565b8061118a575033730576a174d229e3cfa37253523e645a78a0c91b57145b611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b5f61125a611727565b84848460405160200161126f93929190612f93565b604051602081830303815290604052805190602001206040516020016112c79291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b61130d6119f1565b5115611375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064016109fa565b61137e81611ead565b50565b6005545f9073ffffffffffffffffffffffffffffffffffffffff16156113ef576005546040517f4b6c692700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109fa565b335f818152600c602052604090205461140a91908490611251565b335f908152600c6020526040812080549293509061142783612fd1565b9190505550611437338383611d05565b919050565b60606114473361100e565b80611465575033730576a174d229e3cfa37253523e645a78a0c91b57145b6114f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084016109fa565b5f61150b878787878715611505578761201d565b5a61201d565b925090508061151c57815160208301fd5b5095945050505050565b5f818152600b602052604081205473ffffffffffffffffffffffffffffffffffffffff1615611437575f828152600a60205260408082208151808301928390529160029082845b81548152602001906001019080831161156d5750505050509050805f6002811061159957611599612f4b565b60200201511580156115ad57506020810151155b80156115e257505f8052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3548314155b156115f057600291506115f5565b600191505b50919050565b60055473ffffffffffffffffffffffffffffffffffffffff16331461166e576005546040517fe56895c000000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016109fa565b5f818152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff16806116c9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116d38183612120565b8073ffffffffffffffffffffffffffffffffffffffff167fa36a540c5fea3a5e69d4b1c2247b28a93fd183ef1314af26a8db7b3ae080bcd08360405161171b91815260200190565b60405180910390a25050565b5f7f0000000000000000000000000000000000000000000000000000000000000064461461175c57611757612273565b905090565b507f1af5c84f74cdc97698d3db1fa43580d2ba89cf1906fd807083885530650ec82990565b600a602052815f5260405f20816002811061179a575f80fd5b01549150829050565b5f5f6117ad6119f1565b806020019051810190610c629190612f78565b5f828152600b60205260408082205460055491517ff2e433bf0000000000000000000000000000000000000000000000000000000081526004810186905260609373ffffffffffffffffffffffffffffffffffffffff928316939092169063f2e433bf906024016080604051808303815f875af1158015611843573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118679190613008565b602081015190915073ffffffffffffffffffffffffffffffffffffffff1615611891575050610c62565b73ffffffffffffffffffffffffffffffffffffffff82166119275760055473ffffffffffffffffffffffffffffffffffffffff16156118d257806040015191505b73ffffffffffffffffffffffffffffffffffffffff8216611922576040517ffe239804000000000000000000000000000000000000000000000000000000008152600481018690526024016109fa565b611931565b6119318286612120565b73ffffffffffffffffffffffffffffffffffffffff82165f90815260086020526040812080548695509161196483612fd1565b909155505060048054905f61197883612fd1565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b7086856040516119c5929190612de6565b60405180910390a2505092915050565b5f5f5f6119e487878787612371565b9150915061151c81612459565b6060611757611abb6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b61260b565b33730576a174d229e3cfa37253523e645a78a0c91b5714611b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016109fa565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c829052603c81207f1626ba7e00000000000000000000000000000000000000000000000000000000611bd982611ba0610140880188612e69565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610ac592505050565b7fffffffff000000000000000000000000000000000000000000000000000000001614611c0a576001915050610c62565b505f9392505050565b5f805460208301359180611c2683612fd1565b919050551461137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016109fa565b801561137e576040515f9033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d805f8114611cf9576040519150601f19603f3d011682016040523d82523d5f602084013e611cfe565b606091505b5050505050565b611d10348284612660565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600760205260408120805491611d4083612fd1565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f908152600960205260408120805491611d7583612fd1565b90915550505f818152600b6020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8816179055600a9091528082207f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e480546001830181905590859055808452918320849055600280547f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e394929392909190611e3c83612fd1565b909155505060038054905f611e5083612fd1565b91905055508573ffffffffffffffffffffffffffffffffffffffff167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc8587604051611e9d929190612de6565b60405180910390a2505050505050565b5f611eb7826126aa565b90505f8151602083015ff09050611f896040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461115e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c6564000000000000000000000000000000000000000060448201526064016109fa565b5f6060600184600181111561203457612034612d03565b036120a8578673ffffffffffffffffffffffffffffffffffffffff16838660405161205f91906130ac565b5f604051808303818686f4925050503d805f8114612098576040519150601f19603f3d011682016040523d82523d5f602084013e61209d565b606091505b509092509050612116565b8673ffffffffffffffffffffffffffffffffffffffff168387876040516120cf91906130ac565b5f60405180830381858888f193505050503d805f811461210a576040519150601f19603f3d011682016040523d82523d5f602084013e61210f565b606091505b5090925090505b9550959350505050565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600960205260408120805491612150836130b7565b909155505060028054905f612164836130b7565b90915550505f818152600a60205260408082208151808301928390529160029082845b8154815260200190600101908083116121875750505050509050805f600281106121b3576121b3612f4b565b60200201511580156121c757506020810151155b80156121fc57505f8052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3548214155b15612236576040517ffe239804000000000000000000000000000000000000000000000000000000008152600481018390526024016109fa565b6020818101805183515f908152600a9093526040808420600190810192909255935191518352838320919091559281529081208181559091015550565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e312e300000000000000000000000000000000000000000000000000000008152506040516020016122fc9190612cf1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123a657505f90506003612450565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156123f7573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661244a575f60019250925050612450565b91505f90505b94509492505050565b5f81600481111561246c5761246c612d03565b036124745750565b600181600481111561248857612488612d03565b036124ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109fa565b600281600481111561250357612503612d03565b0361256a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109fa565b600381600481111561257e5761257e612d03565b0361137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016109fa565b6060813b6001811161262c57505060408051602081019091525f8152919050565b80612636816130b7565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b60015483101561115e576001546040517fb48978280000000000000000000000000000000000000000000000000000000081526109fa918591600401918252602082015260400190565b6060815160016126ba9190612f38565b826040516020016126cc9291906130eb565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461137e575f5ffd5b5f5f83601f840112612713575f5ffd5b50813567ffffffffffffffff81111561272a575f5ffd5b602083019150836020828501011115612741575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60c0898b03121561275f575f5ffd5b883561276a816126e2565b9750602089013561277a816126e2565b9650604089013561278a816126e2565b955060608901359450608089013567ffffffffffffffff8111156127ac575f5ffd5b6127b88b828c01612703565b90955093505060a089013567ffffffffffffffff8111156127d7575f5ffd5b6127e38b828c01612703565b999c989b5096995094979396929594505050565b5f60208284031215612807575f5ffd5b8135610c85816126e2565b5f5f5f5f5f60808688031215612826575f5ffd5b8535612831816126e2565b94506020860135612841816126e2565b935060408601359250606086013567ffffffffffffffff811115612863575f5ffd5b61286f88828901612703565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126128bc575f5ffd5b813567ffffffffffffffff8111156128d6576128d6612880565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561292357612923612880565b60405281815283820160200185101561293a575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f60408385031215612967575f5ffd5b82359150602083013567ffffffffffffffff811115612984575f5ffd5b612990858286016128ad565b9150509250929050565b5f5f5f606084860312156129ac575f5ffd5b833567ffffffffffffffff8111156129c2575f5ffd5b840161016081870312156129d4575f5ffd5b95602085013595506040909401359392505050565b5f5f5f5f608085870312156129fc575f5ffd5b84359350602085013567ffffffffffffffff811115612a19575f5ffd5b612a25878288016128ad565b9350506040850135612a36816126e2565b9396929550929360600135925050565b5f5f60408385031215612a57575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b81811015612a9d578351835260209384019390920191600101612a7f565b509095945050505050565b5f5f5f60608486031215612aba575f5ffd5b8335612ac5816126e2565b9250602084013567ffffffffffffffff811115612ae0575f5ffd5b612aec868287016128ad565b93969395505050506040919091013590565b5f60208284031215612b0e575f5ffd5b5035919050565b5f60208284031215612b25575f5ffd5b813567ffffffffffffffff811115612b3b575f5ffd5b612b47848285016128ad565b949350505050565b5f5f83601f840112612b5f575f5ffd5b50813567ffffffffffffffff811115612b76575f5ffd5b6020830191508360208260051b8501011115612741575f5ffd5b5f5f5f5f5f5f5f5f60a0898b031215612ba7575f5ffd5b8835612bb2816126e2565b97506020890135612bc2816126e2565b9650604089013567ffffffffffffffff811115612bdd575f5ffd5b612be98b828c01612b4f565b909750955050606089013567ffffffffffffffff811115612c08575f5ffd5b612c148b828c01612b4f565b909550935050608089013567ffffffffffffffff8111156127d7575f5ffd5b5f5f5f5f5f60a08688031215612c47575f5ffd5b8535612c52816126e2565b945060208601359350604086013567ffffffffffffffff811115612c74575f5ffd5b612c80888289016128ad565b935050606086013560028110612c94575f5ffd5b949793965091946080013592915050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610c856020830184612ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6020810160038310612d69577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f5f5f5f5f5f60a08789031215612d84575f5ffd5b8635612d8f816126e2565b95506020870135612d9f816126e2565b94506040870135935060608701359250608087013567ffffffffffffffff811115612dc8575f5ffd5b612dd489828a01612703565b979a9699509497509295939492505050565b828152604060208201525f612b476040830184612ca5565b5f60208284031215612e0e575f5ffd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c85575f5ffd5b5f5f60408385031215612e4e575f5ffd5b8251612e59816126e2565b6020939093015192949293505050565b5f5f83357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e9c575f5ffd5b83018035915067ffffffffffffffff821115612eb6575f5ffd5b602001915036819003821315612741575f5ffd5b848152608060208201525f612ee26080830186612ca5565b73ffffffffffffffffffffffffffffffffffffffff949094166040830152506060015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610c6257610c62612f0b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612f88575f5ffd5b8151610c85816126e2565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f612fc16060830185612ca5565b9050826040830152949350505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361300157613001612f0b565b5060010190565b5f6080828403128015613019575f5ffd5b506040516080810167ffffffffffffffff8111828210171561303d5761303d612880565b604052825161304b816126e2565b8152602083015161305b816126e2565b6020820152604083015161306e816126e2565b6040820152606083015163ffffffff81168114613089575f5ffd5b60608201529392505050565b5f81518060208401855e5f93019283525090919050565b5f610c858284613095565b5f816130c5576130c5612f0b565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201525f600e8201525f612b47600f83018461309556fea2646970667358221220704524f95757c94019cddad03ecfec4f1e3e0d509ed6ce5bc971e103a7b7c95664736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e49cb081e8d96920c38aa7ab90cb0294ab4bc8ea0000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000004554fe75c1f5576c1d7f765b2a036c199adae329
-----Decoded View---------------
Arg [0] : _token (address): 0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA
Arg [1] : _tokenId (uint256): 9
Arg [2] : _price (uint256): 10000000000000000
Arg [3] : _mechMarketplace (address): 0x4554fE75c1f5576c1d7F765B2A036c199Adae329
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000e49cb081e8d96920c38aa7ab90cb0294ab4bc8ea
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [2] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [3] : 0000000000000000000000004554fe75c1f5576c1d7f765b2a036c199adae329
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
GNO | ![]() | 100.00% | $0.999972 | 4,156.32 | $4,156.2 |
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.