More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 37,935 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Settle Orders | 44167504 | 247 days ago | IN | 0 AVAX | 0.01636432 | ||||
Settle Orders | 44166334 | 247 days ago | IN | 0 AVAX | 0.00176859 | ||||
Settle Orders | 44166258 | 247 days ago | IN | 0 AVAX | 0.01446103 | ||||
Settle Orders | 44166050 | 247 days ago | IN | 0 AVAX | 0.01234976 | ||||
Settle Orders | 44165290 | 247 days ago | IN | 0 AVAX | 0.0016365 | ||||
Settle Orders | 44165147 | 247 days ago | IN | 0 AVAX | 0.07742739 | ||||
Settle Orders | 44164978 | 247 days ago | IN | 0 AVAX | 0.10540243 | ||||
Settle Orders | 44164816 | 247 days ago | IN | 0 AVAX | 0.09456166 | ||||
Settle Orders | 44164664 | 247 days ago | IN | 0 AVAX | 0.00844093 | ||||
Settle Orders | 44164276 | 247 days ago | IN | 0 AVAX | 0.06781979 | ||||
Settle Orders | 44164205 | 247 days ago | IN | 0 AVAX | 0.04507005 | ||||
Settle Orders | 44164193 | 247 days ago | IN | 0 AVAX | 0.00810124 | ||||
Settle Orders | 44164180 | 247 days ago | IN | 0 AVAX | 0.044933 | ||||
Settle Orders | 44164140 | 247 days ago | IN | 0 AVAX | 0.03956485 | ||||
Settle Orders | 44163867 | 247 days ago | IN | 0 AVAX | 0.92348898 | ||||
Settle Orders | 44163151 | 247 days ago | IN | 0 AVAX | 0.43339247 | ||||
Settle Orders | 44163102 | 247 days ago | IN | 0 AVAX | 0.0166859 | ||||
Settle Orders | 44163034 | 247 days ago | IN | 0 AVAX | 0.10790718 | ||||
Settle Orders | 44162991 | 247 days ago | IN | 0 AVAX | 0.03511615 | ||||
Settle Orders | 44162978 | 247 days ago | IN | 0 AVAX | 0.20261407 | ||||
Settle Orders | 44162432 | 247 days ago | IN | 0 AVAX | 0.00167322 | ||||
Settle Orders | 44160718 | 247 days ago | IN | 0 AVAX | 0.01003016 | ||||
Settle Orders | 44159753 | 247 days ago | IN | 0 AVAX | 0.01119258 | ||||
Settle Orders | 44159301 | 247 days ago | IN | 0 AVAX | 0.01067815 | ||||
Settle Orders | 44159144 | 247 days ago | IN | 0 AVAX | 0.00225071 |
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
27122759 | 650 days ago | Contract Creation | 0 AVAX |
Loading...
Loading
Contract Name:
Settlement
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@1inch/limit-order-protocol-contract/contracts/interfaces/IOrderMixin.sol"; import "@1inch/solidity-utils/contracts/libraries/SafeERC20.sol"; import "./interfaces/ISettlement.sol"; import "./interfaces/IResolver.sol"; import "./libraries/DynamicSuffix.sol"; import "./libraries/OrderSaltParser.sol"; import "./libraries/OrderSuffix.sol"; import "./FeeBankCharger.sol"; contract Settlement is ISettlement, FeeBankCharger { using SafeERC20 for IERC20; using OrderSaltParser for uint256; using DynamicSuffix for bytes; using AddressLib for Address; using OrderSuffix for OrderLib.Order; using TakingFee for TakingFee.Data; error AccessDenied(); error IncorrectCalldataParams(); error FailedExternalCall(); error ResolverIsNotWhitelisted(); error WrongInteractionTarget(); bytes1 private constant _FINALIZE_INTERACTION = 0x01; uint256 private constant _ORDER_FEE_BASE_POINTS = 1e15; uint256 private constant _BASE_POINTS = 10_000_000; // 100% IOrderMixin private immutable _limitOrderProtocol; modifier onlyThis(address account) { if (account != address(this)) revert AccessDenied(); _; } modifier onlyLimitOrderProtocol { if (msg.sender != address(_limitOrderProtocol)) revert AccessDenied(); _; } constructor(IOrderMixin limitOrderProtocol, IERC20 token) FeeBankCharger(token) { _limitOrderProtocol = limitOrderProtocol; } function settleOrders(bytes calldata data) external { _settleOrder(data, msg.sender, 0, new bytes(0)); } function fillOrderInteraction( address taker, uint256, /* makingAmount */ uint256 takingAmount, bytes calldata interactiveData ) external onlyThis(taker) onlyLimitOrderProtocol returns (uint256 result) { (DynamicSuffix.Data calldata suffix, bytes calldata tokensAndAmounts, bytes calldata interaction) = interactiveData.decodeSuffix(); IERC20 token = IERC20(suffix.token.get()); result = takingAmount * (_BASE_POINTS + suffix.rateBump) / _BASE_POINTS; uint256 takingFee = result * suffix.takingFee.ratio() / TakingFee._TAKING_FEE_BASE; bytes memory allTokensAndAmounts = new bytes(tokensAndAmounts.length + 0x40); assembly { let ptr := add(allTokensAndAmounts, 0x20) calldatacopy(ptr, tokensAndAmounts.offset, tokensAndAmounts.length) ptr := add(ptr, tokensAndAmounts.length) mstore(ptr, token) mstore(add(ptr, 0x20), add(result, takingFee)) } if (interactiveData[0] == _FINALIZE_INTERACTION) { _chargeFee(suffix.resolver.get(), suffix.totalFee); address target = address(bytes20(interaction)); bytes calldata data = interaction[20:]; IResolver(target).resolveOrders(suffix.resolver.get(), allTokensAndAmounts, data); } else { _settleOrder( interaction, suffix.resolver.get(), suffix.totalFee, allTokensAndAmounts ); } if (takingFee > 0) { token.safeTransfer(suffix.takingFee.receiver(), takingFee); } token.forceApprove(address(_limitOrderProtocol), result); } bytes4 private constant _FILL_ORDER_TO_SELECTOR = 0xe5d7bde6; // IOrderMixin.fillOrderTo.selector bytes4 private constant _WRONG_INTERACTION_TARGET_SELECTOR = 0x5b34bf89; // WrongInteractionTarget.selector function _settleOrder(bytes calldata data, address resolver, uint256 totalFee, bytes memory tokensAndAmounts) private { OrderLib.Order calldata order; assembly { order := add(data.offset, calldataload(data.offset)) } if (!order.checkResolver(resolver)) revert ResolverIsNotWhitelisted(); TakingFee.Data takingFeeData = order.takingFee(); totalFee += order.salt.getFee() * _ORDER_FEE_BASE_POINTS; uint256 rateBump = order.rateBump(); uint256 suffixLength = DynamicSuffix._STATIC_DATA_SIZE + tokensAndAmounts.length + 0x20; IOrderMixin limitOrderProtocol = _limitOrderProtocol; assembly { function memcpy(dst, src, len) { pop(staticcall(gas(), 0x4, src, len, dst, len)) } let interactionLengthOffset := calldataload(add(data.offset, 0x40)) let interactionOffset := add(interactionLengthOffset, 0x20) let interactionLength := calldataload(add(data.offset, interactionLengthOffset)) { // stack too deep let target := shr(96, calldataload(add(data.offset, interactionOffset))) if or(lt(interactionLength, 20), iszero(eq(target, address()))) { mstore(0, _WRONG_INTERACTION_TARGET_SELECTOR) revert(0, 4) } } // Copy calldata and patch interaction.length let ptr := mload(0x40) mstore(ptr, _FILL_ORDER_TO_SELECTOR) calldatacopy(add(ptr, 4), data.offset, data.length) mstore(add(add(ptr, interactionLengthOffset), 4), add(interactionLength, suffixLength)) { // stack too deep // Append suffix fields let offset := add(add(ptr, interactionOffset), interactionLength) mstore(add(offset, 0x04), totalFee) mstore(add(offset, 0x24), resolver) mstore(add(offset, 0x44), calldataload(add(order, 0x40))) // takerAsset mstore(add(offset, 0x64), rateBump) mstore(add(offset, 0x84), takingFeeData) let tokensAndAmountsLength := mload(tokensAndAmounts) memcpy(add(offset, 0xa4), add(tokensAndAmounts, 0x20), tokensAndAmountsLength) mstore(add(offset, add(0xa4, tokensAndAmountsLength)), tokensAndAmountsLength) } // Call fillOrderTo if iszero(call(gas(), limitOrderProtocol, 0, ptr, add(add(4, suffixLength), data.length), ptr, 0)) { returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; pragma abicoder v1; /** * @title Interface for interactor which acts after `taker -> maker` transfers. * @notice The order filling steps are `preInteraction` =>` Transfer "maker -> taker"` => **`Interaction`** => `Transfer "taker -> maker"` => `postInteraction` */ interface IInteractionNotificationReceiver { /** * @notice Callback method that gets called after all funds transfers * @param taker Taker address (tx sender) * @param makingAmount Actual making amount * @param takingAmount Actual taking amount * @param interactionData Interaction calldata * @return offeredTakingAmount Suggested amount. Order is filled with this amount if maker or taker getter functions are not defined. */ function fillOrderInteraction( address taker, uint256 makingAmount, uint256 takingAmount, bytes memory interactionData ) external returns(uint256 offeredTakingAmount); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "../OrderLib.sol"; interface IOrderMixin { /** * @notice Returns unfilled amount for order. Throws if order does not exist * @param orderHash Order's hash. Can be obtained by the `hashOrder` function * @return amount Unfilled amount */ function remaining(bytes32 orderHash) external view returns(uint256 amount); /** * @notice Returns unfilled amount for order * @param orderHash Order's hash. Can be obtained by the `hashOrder` function * @return rawAmount Unfilled amount of order plus one if order exists. Otherwise 0 */ function remainingRaw(bytes32 orderHash) external view returns(uint256 rawAmount); /** * @notice Same as `remainingRaw` but for multiple orders * @param orderHashes Array of hashes * @return rawAmounts Array of amounts for each order plus one if order exists or 0 otherwise */ function remainingsRaw(bytes32[] memory orderHashes) external view returns(uint256[] memory rawAmounts); /** * @notice Checks order predicate * @param order Order to check predicate for * @return result Predicate evaluation result. True if predicate allows to fill the order, false otherwise */ function checkPredicate(OrderLib.Order calldata order) external view returns(bool result); /** * @notice Returns order hash according to EIP712 standard * @param order Order to get hash for * @return orderHash Hash of the order */ function hashOrder(OrderLib.Order calldata order) external view returns(bytes32 orderHash); /** * @notice Delegates execution to custom implementation. Could be used to validate if `transferFrom` works properly * @dev The function always reverts and returns the simulation results in revert data. * @param target Addresses that will be delegated * @param data Data that will be passed to delegatee */ function simulate(address target, bytes calldata data) external; /** * @notice Cancels order. * @dev Order is cancelled by setting remaining amount to _ORDER_FILLED value * @param order Order quote to cancel * @return orderRemaining Unfilled amount of order before cancellation * @return orderHash Hash of the filled order */ function cancelOrder(OrderLib.Order calldata order) external returns(uint256 orderRemaining, bytes32 orderHash); /** * @notice Fills an order. If one doesn't exist (first fill) it will be created using order.makerAssetData * @param order Order quote to fill * @param signature Signature to confirm quote ownership * @param interaction A call data for InteractiveNotificationReceiver. Taker may execute interaction after getting maker assets and before sending taker assets. * @param makingAmount Making amount * @param takingAmount Taking amount * @param skipPermitAndThresholdAmount Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount. Top-most bit specifies whether taker wants to skip maker's permit. * @return actualMakingAmount Actual amount transferred from maker to taker * @return actualTakingAmount Actual amount transferred from taker to maker * @return orderHash Hash of the filled order */ function fillOrder( OrderLib.Order calldata order, bytes calldata signature, bytes calldata interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount ) external payable returns(uint256 actualMakingAmount, uint256 actualTakingAmount, bytes32 orderHash); /** * @notice Same as `fillOrderTo` but calls permit first, * allowing to approve token spending and make a swap in one transaction. * Also allows to specify funds destination instead of `msg.sender` * @dev See tests for examples * @param order Order quote to fill * @param signature Signature to confirm quote ownership * @param interaction A call data for InteractiveNotificationReceiver. Taker may execute interaction after getting maker assets and before sending taker assets. * @param makingAmount Making amount * @param takingAmount Taking amount * @param skipPermitAndThresholdAmount Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount. Top-most bit specifies whether taker wants to skip maker's permit. * @param target Address that will receive swap funds * @param permit Should consist of abiencoded token address and encoded `IERC20Permit.permit` call. * @return actualMakingAmount Actual amount transferred from maker to taker * @return actualTakingAmount Actual amount transferred from taker to maker * @return orderHash Hash of the filled order */ function fillOrderToWithPermit( OrderLib.Order calldata order, bytes calldata signature, bytes calldata interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount, address target, bytes calldata permit ) external returns(uint256 actualMakingAmount, uint256 actualTakingAmount, bytes32 orderHash); /** * @notice Same as `fillOrder` but allows to specify funds destination instead of `msg.sender` * @param order_ Order quote to fill * @param signature Signature to confirm quote ownership * @param interaction A call data for InteractiveNotificationReceiver. Taker may execute interaction after getting maker assets and before sending taker assets. * @param makingAmount Making amount * @param takingAmount Taking amount * @param skipPermitAndThresholdAmount Specifies maximum allowed takingAmount when takingAmount is zero, otherwise specifies minimum allowed makingAmount. Top-most bit specifies whether taker wants to skip maker's permit. * @param target Address that will receive swap funds * @return actualMakingAmount Actual amount transferred from maker to taker * @return actualTakingAmount Actual amount transferred from taker to maker * @return orderHash Hash of the filled order */ function fillOrderTo( OrderLib.Order calldata order_, bytes calldata signature, bytes calldata interaction, uint256 makingAmount, uint256 takingAmount, uint256 skipPermitAndThresholdAmount, address target ) external payable returns(uint256 actualMakingAmount, uint256 actualTakingAmount, bytes32 orderHash); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@1inch/solidity-utils/contracts/libraries/ECDSA.sol"; library OrderLib { struct Order { uint256 salt; address makerAsset; address takerAsset; address maker; address receiver; address allowedSender; // equals to Zero address on public orders uint256 makingAmount; uint256 takingAmount; uint256 offsets; // bytes makerAssetData; // bytes takerAssetData; // bytes getMakingAmount; // this.staticcall(abi.encodePacked(bytes, swapTakerAmount)) => (swapMakerAmount) // bytes getTakingAmount; // this.staticcall(abi.encodePacked(bytes, swapMakerAmount)) => (swapTakerAmount) // bytes predicate; // this.staticcall(bytes) => (bool) // bytes permit; // On first fill: permit.1.call(abi.encodePacked(permit.selector, permit.2)) // bytes preInteraction; // bytes postInteraction; bytes interactions; // concat(makerAssetData, takerAssetData, getMakingAmount, getTakingAmount, predicate, permit, preIntercation, postInteraction) } bytes32 constant internal _LIMIT_ORDER_TYPEHASH = keccak256( "Order(" "uint256 salt," "address makerAsset," "address takerAsset," "address maker," "address receiver," "address allowedSender," "uint256 makingAmount," "uint256 takingAmount," "uint256 offsets," "bytes interactions" ")" ); enum DynamicField { MakerAssetData, TakerAssetData, GetMakingAmount, GetTakingAmount, Predicate, Permit, PreInteraction, PostInteraction } function getterIsFrozen(bytes calldata getter) internal pure returns(bool) { return getter.length == 1 && getter[0] == "x"; } function _get(Order calldata order, DynamicField field) private pure returns(bytes calldata) { uint256 bitShift = uint256(field) << 5; // field * 32 return order.interactions[ uint32((order.offsets << 32) >> bitShift): uint32(order.offsets >> bitShift) ]; } function makerAssetData(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.MakerAssetData); } function takerAssetData(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.TakerAssetData); } function getMakingAmount(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.GetMakingAmount); } function getTakingAmount(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.GetTakingAmount); } function predicate(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.Predicate); } function permit(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.Permit); } function preInteraction(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.PreInteraction); } function postInteraction(Order calldata order) internal pure returns(bytes calldata) { return _get(order, DynamicField.PostInteraction); } function hash(Order calldata order, bytes32 domainSeparator) internal pure returns(bytes32 result) { bytes calldata interactions = order.interactions; bytes32 typehash = _LIMIT_ORDER_TYPEHASH; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) // keccak256(abi.encode(_LIMIT_ORDER_TYPEHASH, orderWithoutInteractions, keccak256(order.interactions))); calldatacopy(ptr, interactions.offset, interactions.length) mstore(add(ptr, 0x140), keccak256(ptr, interactions.length)) calldatacopy(add(ptr, 0x20), order, 0x120) mstore(ptr, typehash) result := keccak256(ptr, 0x160) } result = ECDSA.toTypedDataHash(domainSeparator, result); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v1; interface IDaiLikePermit { function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v1; type Address is uint256; library AddressLib { function get(Address a) internal pure returns (address) { return address(uint160(Address.unwrap(a))); } function getFlag(Address a, uint256 flag) internal pure returns (bool) { return (Address.unwrap(a) & flag) != 0; } function getUint32(Address a, uint256 offset) internal pure returns (uint32) { return uint32(Address.unwrap(a) >> offset); } function getUint64(Address a, uint256 offset) internal pure returns (uint64) { return uint64(Address.unwrap(a) >> offset); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v1; import "@openzeppelin/contracts/interfaces/IERC1271.sol"; library ECDSA { // 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. uint256 private constant _S_BOUNDARY = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 + 1; uint256 private constant _COMPACT_S_MASK = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; uint256 private constant _COMPACT_V_SHIFT = 255; function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal view returns (address signer) { /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly if lt(s, _S_BOUNDARY) { let ptr := mload(0x40) mstore(ptr, hash) mstore(add(ptr, 0x20), v) mstore(add(ptr, 0x40), r) mstore(add(ptr, 0x60), s) mstore(0, 0) pop(staticcall(gas(), 0x1, ptr, 0x80, 0, 0x20)) signer := mload(0) } } } function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal view returns (address signer) { /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let s := and(vs, _COMPACT_S_MASK) if lt(s, _S_BOUNDARY) { let ptr := mload(0x40) mstore(ptr, hash) mstore(add(ptr, 0x20), add(27, shr(_COMPACT_V_SHIFT, vs))) mstore(add(ptr, 0x40), r) mstore(add(ptr, 0x60), s) mstore(0, 0) pop(staticcall(gas(), 0x1, ptr, 0x80, 0, 0x20)) signer := mload(0) } } } /// @dev WARNING!!! /// There is a known signature malleability issue with two representations of signatures! /// Even though this function is able to verify both standard 65-byte and compact 64-byte EIP-2098 signatures /// one should never use raw signatures for any kind of invalidation logic in their code. /// As the standard and compact representations are interchangeable any invalidation logic that relies on /// signature uniqueness will get rekt. /// More info: https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4h98-2769-gh6h function recover(bytes32 hash, bytes calldata signature) internal view returns (address signer) { /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) // memory[ptr:ptr+0x80] = (hash, v, r, s) switch signature.length case 65 { // memory[ptr+0x20:ptr+0x80] = (v, r, s) mstore(add(ptr, 0x20), byte(0, calldataload(add(signature.offset, 0x40)))) calldatacopy(add(ptr, 0x40), signature.offset, 0x40) } case 64 { // memory[ptr+0x20:ptr+0x80] = (v, r, s) let vs := calldataload(add(signature.offset, 0x20)) mstore(add(ptr, 0x20), add(27, shr(_COMPACT_V_SHIFT, vs))) calldatacopy(add(ptr, 0x40), signature.offset, 0x20) mstore(add(ptr, 0x60), and(vs, _COMPACT_S_MASK)) } default { ptr := 0 } if ptr { if lt(mload(add(ptr, 0x60)), _S_BOUNDARY) { // memory[ptr:ptr+0x20] = (hash) mstore(ptr, hash) mstore(0, 0) pop(staticcall(gas(), 0x1, ptr, 0x80, 0, 0x20)) signer := mload(0) } } } } function recoverOrIsValidSignature( address signer, bytes32 hash, bytes calldata signature ) internal view returns (bool success) { if (signer == address(0)) return false; if ((signature.length == 64 || signature.length == 65) && recover(hash, signature) == signer) { return true; } return isValidSignature(signer, hash, signature); } function recoverOrIsValidSignature( address signer, bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal view returns (bool success) { if (signer == address(0)) return false; if (recover(hash, v, r, s) == signer) { return true; } return isValidSignature(signer, hash, v, r, s); } function recoverOrIsValidSignature( address signer, bytes32 hash, bytes32 r, bytes32 vs ) internal view returns (bool success) { if (signer == address(0)) return false; if (recover(hash, r, vs) == signer) { return true; } return isValidSignature(signer, hash, r, vs); } function recoverOrIsValidSignature65( address signer, bytes32 hash, bytes32 r, bytes32 vs ) internal view returns (bool success) { if (signer == address(0)) return false; if (recover(hash, r, vs) == signer) { return true; } return isValidSignature65(signer, hash, r, vs); } function isValidSignature( address signer, bytes32 hash, bytes calldata signature ) internal view returns (bool success) { // (bool success, bytes memory data) = signer.staticcall(abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)); // return success && data.length >= 4 && abi.decode(data, (bytes4)) == IERC1271.isValidSignature.selector; bytes4 selector = IERC1271.isValidSignature.selector; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) mstore(ptr, selector) mstore(add(ptr, 0x04), hash) mstore(add(ptr, 0x24), 0x40) mstore(add(ptr, 0x44), signature.length) calldatacopy(add(ptr, 0x64), signature.offset, signature.length) if staticcall(gas(), signer, ptr, add(0x64, signature.length), 0, 0x20) { success := and(eq(selector, mload(0)), eq(returndatasize(), 0x20)) } } } function isValidSignature( address signer, bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal view returns (bool success) { bytes4 selector = IERC1271.isValidSignature.selector; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) mstore(ptr, selector) mstore(add(ptr, 0x04), hash) mstore(add(ptr, 0x24), 0x40) mstore(add(ptr, 0x44), 65) mstore(add(ptr, 0x64), r) mstore(add(ptr, 0x84), s) mstore8(add(ptr, 0xa4), v) if staticcall(gas(), signer, ptr, 0xa5, 0, 0x20) { success := and(eq(selector, mload(0)), eq(returndatasize(), 0x20)) } } } function isValidSignature( address signer, bytes32 hash, bytes32 r, bytes32 vs ) internal view returns (bool success) { // (bool success, bytes memory data) = signer.staticcall(abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, abi.encodePacked(r, vs))); // return success && data.length >= 4 && abi.decode(data, (bytes4)) == IERC1271.isValidSignature.selector; bytes4 selector = IERC1271.isValidSignature.selector; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) mstore(ptr, selector) mstore(add(ptr, 0x04), hash) mstore(add(ptr, 0x24), 0x40) mstore(add(ptr, 0x44), 64) mstore(add(ptr, 0x64), r) mstore(add(ptr, 0x84), vs) if staticcall(gas(), signer, ptr, 0xa4, 0, 0x20) { success := and(eq(selector, mload(0)), eq(returndatasize(), 0x20)) } } } function isValidSignature65( address signer, bytes32 hash, bytes32 r, bytes32 vs ) internal view returns (bool success) { // (bool success, bytes memory data) = signer.staticcall(abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, abi.encodePacked(r, vs & ~uint256(1 << 255), uint8(vs >> 255)))); // return success && data.length >= 4 && abi.decode(data, (bytes4)) == IERC1271.isValidSignature.selector; bytes4 selector = IERC1271.isValidSignature.selector; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) mstore(ptr, selector) mstore(add(ptr, 0x04), hash) mstore(add(ptr, 0x24), 0x40) mstore(add(ptr, 0x44), 65) mstore(add(ptr, 0x64), r) mstore(add(ptr, 0x84), and(vs, _COMPACT_S_MASK)) mstore8(add(ptr, 0xa4), add(27, shr(_COMPACT_V_SHIFT, vs))) if staticcall(gas(), signer, ptr, 0xa5, 0, 0x20) { success := and(eq(selector, mload(0)), eq(returndatasize(), 0x20)) } } } function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 res) { // 32 is the length in bytes of hash, enforced by the type signature above // return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly mstore(0, 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000) // "\x19Ethereum Signed Message:\n32" mstore(28, hash) res := keccak256(0, 60) } } function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 res) { // return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) mstore(ptr, 0x1901000000000000000000000000000000000000000000000000000000000000) // "\x19\x01" mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) res := keccak256(ptr, 66) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v1; /// @title Revert reason forwarder. library RevertReasonForwarder { /// @dev Forwards latest externall call revert. function reRevert() internal pure { // bubble up revert reason from latest external call /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v1; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol"; import "../interfaces/IDaiLikePermit.sol"; import "../libraries/RevertReasonForwarder.sol"; /// @title Implements efficient safe methods for ERC20 interface. library SafeERC20 { error SafeTransferFailed(); error SafeTransferFromFailed(); error ForceApproveFailed(); error SafeIncreaseAllowanceFailed(); error SafeDecreaseAllowanceFailed(); error SafePermitBadLength(); /// @dev Ensures method do not revert or return boolean `true`, admits call to non-smart-contract. function safeTransferFrom( IERC20 token, address from, address to, uint256 amount ) internal { bytes4 selector = token.transferFrom.selector; bool success; /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let data := mload(0x40) mstore(data, selector) mstore(add(data, 0x04), from) mstore(add(data, 0x24), to) mstore(add(data, 0x44), amount) success := call(gas(), token, 0, data, 100, 0x0, 0x20) if success { switch returndatasize() case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } if (!success) revert SafeTransferFromFailed(); } /// @dev Ensures method do not revert or return boolean `true`, admits call to non-smart-contract. function safeTransfer( IERC20 token, address to, uint256 value ) internal { if (!_makeCall(token, token.transfer.selector, to, value)) { revert SafeTransferFailed(); } } /// @dev If `approve(from, to, amount)` fails, try to `approve(from, to, 0)` before retry. function forceApprove( IERC20 token, address spender, uint256 value ) internal { if (!_makeCall(token, token.approve.selector, spender, value)) { if ( !_makeCall(token, token.approve.selector, spender, 0) || !_makeCall(token, token.approve.selector, spender, value) ) { revert ForceApproveFailed(); } } } /// @dev Allowance increase with safe math check. function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 allowance = token.allowance(address(this), spender); if (value > type(uint256).max - allowance) revert SafeIncreaseAllowanceFailed(); forceApprove(token, spender, allowance + value); } /// @dev Allowance decrease with safe math check. function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 allowance = token.allowance(address(this), spender); if (value > allowance) revert SafeDecreaseAllowanceFailed(); forceApprove(token, spender, allowance - value); } /// @dev Calls either ERC20 or Dai `permit` for `token`, if unsuccessful forwards revert from external call. function safePermit(IERC20 token, bytes calldata permit) internal { if (!tryPermit(token, permit)) RevertReasonForwarder.reRevert(); } function tryPermit(IERC20 token, bytes calldata permit) internal returns(bool) { if (permit.length == 32 * 7) { return _makeCalldataCall(token, IERC20Permit.permit.selector, permit); } if (permit.length == 32 * 8) { return _makeCalldataCall(token, IDaiLikePermit.permit.selector, permit); } revert SafePermitBadLength(); } function _makeCall( IERC20 token, bytes4 selector, address to, uint256 amount ) private returns (bool success) { /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let data := mload(0x40) mstore(data, selector) mstore(add(data, 0x04), to) mstore(add(data, 0x24), amount) success := call(gas(), token, 0, data, 0x44, 0x0, 0x20) if success { switch returndatasize() case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } } function _makeCalldataCall( IERC20 token, bytes4 selector, bytes calldata args ) private returns (bool success) { /// @solidity memory-safe-assembly assembly { // solhint-disable-line no-inline-assembly let len := add(4, args.length) let data := mload(0x40) mstore(data, selector) calldatacopy(add(data, 0x04), args.offset, args.length) success := call(gas(), token, 0, data, len, 0x0, 0x20) if success { switch returndatasize() case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@1inch/solidity-utils/contracts/libraries/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IFeeBankCharger.sol"; import "./interfaces/IFeeBank.sol"; /// @title Contract with fee mechanism for solvers to pay for using the system contract FeeBank is IFeeBank, Ownable { using SafeERC20 for IERC20; error ZeroAddress(); IERC20 private immutable _token; IFeeBankCharger private immutable _charger; mapping(address => uint256) private _accountDeposits; constructor(IFeeBankCharger charger_, IERC20 inch_, address owner_) { if (address(charger_) == address(0)) revert ZeroAddress(); if (address(inch_) == address(0)) revert ZeroAddress(); _charger = charger_; _token = inch_; transferOwnership(owner_); } function availableCredit(address account) external view returns (uint256) { return _charger.availableCredit(account); } /** * @notice Increment sender's availableCredit in Settlement contract. * @param amount The amount of 1INCH sender pay for incresing. * @return totalAvailableCredit The total sender's availableCredit after deposit. */ function deposit(uint256 amount) external returns (uint256 totalAvailableCredit) { return _depositFor(msg.sender, amount); } /** * @notice Increases account's availableCredit in Settlement contract. * @param account The account whose availableCredit is increased by the sender. * @param amount The amount of 1INCH sender pay for incresing. * @return totalAvailableCredit The total account's availableCredit after deposit. */ function depositFor(address account, uint256 amount) external returns (uint256 totalAvailableCredit) { return _depositFor(account, amount); } /** * @notice See {deposit}. This method uses permit for deposit without prior approves. * @param amount The amount of 1INCH sender pay for incresing. * @param permit The data with sender's permission via token. * @return totalAvailableCredit The total sender's availableCredit after deposit. */ function depositWithPermit(uint256 amount, bytes calldata permit) external returns (uint256 totalAvailableCredit) { return depositForWithPermit(msg.sender, amount, permit); } /** * @notice See {depositFor} and {depositWithPermit}. */ function depositForWithPermit( address account, uint256 amount, bytes calldata permit ) public returns (uint256 totalAvailableCredit) { _token.safePermit(permit); return _depositFor(account, amount); } /** * @notice Returns unspent availableCredit. * @param amount The amount of 1INCH sender returns. * @return totalAvailableCredit The total sender's availableCredit after withdrawal. */ function withdraw(uint256 amount) external returns (uint256 totalAvailableCredit) { return _withdrawTo(msg.sender, amount); } /** * @notice Returns unspent availableCredit to specific account. * @param account The account which get withdrawaled tokens. * @param amount The amount of withdrawaled tokens. * @return totalAvailableCredit The total sender's availableCredit after withdrawal. */ function withdrawTo(address account, uint256 amount) external returns (uint256 totalAvailableCredit) { return _withdrawTo(account, amount); } /** * @notice Admin method returns commissions spent by users. * @param accounts Accounts whose commissions are being withdrawn. * @return totalAccountFees The total amount of accounts commissions. */ function gatherFees(address[] memory accounts) external onlyOwner returns (uint256 totalAccountFees) { uint256 accountsLength = accounts.length; unchecked { for (uint256 i = 0; i < accountsLength; ++i) { address account = accounts[i]; uint256 accountDeposit = _accountDeposits[account]; uint256 availableCredit_ = _charger.availableCredit(account); _accountDeposits[account] = availableCredit_; totalAccountFees += accountDeposit - availableCredit_; // overflow is impossible due to checks in FeeBankCharger } } _token.safeTransfer(msg.sender, totalAccountFees); } function _depositFor(address account, uint256 amount) internal returns (uint256 totalAvailableCredit) { if (account == address(0)) revert ZeroAddress(); _token.safeTransferFrom(msg.sender, address(this), amount); unchecked { _accountDeposits[account] += amount; // overflow is impossible due to limited _token supply } totalAvailableCredit = _charger.increaseAvailableCredit(account, amount); } function _withdrawTo(address account, uint256 amount) internal returns (uint256 totalAvailableCredit) { totalAvailableCredit = _charger.decreaseAvailableCredit(msg.sender, amount); unchecked { _accountDeposits[msg.sender] -= amount; // overflow is impossible due to checks in FeeBankCharger } _token.safeTransfer(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IFeeBankCharger.sol"; import "./FeeBank.sol"; contract FeeBankCharger is IFeeBankCharger { error OnlyFeeBankAccess(); error NotEnoughCredit(); IFeeBank public immutable feeBank; mapping(address => uint256) private _creditAllowance; modifier onlyFeeBank() { if (msg.sender != address(feeBank)) revert OnlyFeeBankAccess(); _; } constructor(IERC20 token) { feeBank = new FeeBank(this, token, msg.sender); } function availableCredit(address account) external view returns (uint256) { return _creditAllowance[account]; } function increaseAvailableCredit(address account, uint256 amount) external onlyFeeBank returns (uint256 allowance) { allowance = _creditAllowance[account]; unchecked { allowance += amount; // overflow is impossible due to limited _token supply } _creditAllowance[account] = allowance; } function decreaseAvailableCredit(address account, uint256 amount) external onlyFeeBank returns (uint256 allowance) { allowance = _creditAllowance[account]; allowance -= amount; // checked math is needed to prevent underflow _creditAllowance[account] = allowance; } function _chargeFee(address account, uint256 fee) internal { if (fee > 0) { uint256 currentAllowance = _creditAllowance[account]; if (currentAllowance < fee) revert NotEnoughCredit(); unchecked { _creditAllowance[account] = currentAllowance - fee; } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; interface IFeeBank { function availableCredit(address account) external view returns (uint256); function deposit(uint256 amount) external returns (uint256 totalAvailableCredit); function depositFor(address account, uint256 amount) external returns (uint256 totalAvailableCredit); function depositWithPermit(uint256 amount, bytes calldata permit) external returns (uint256 totalAvailableCredit); function depositForWithPermit(address account, uint256 amount, bytes calldata permit) external returns (uint256 totalAvailableCredit); function withdraw(uint256 amount) external returns (uint256 totalAvailableCredit); function withdrawTo(address account, uint256 amount) external returns (uint256 totalAvailableCredit); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./IFeeBank.sol"; interface IFeeBankCharger { function feeBank() external view returns (IFeeBank); function availableCredit(address account) external view returns (uint256); function increaseAvailableCredit(address account, uint256 amount) external returns (uint256 allowance); function decreaseAvailableCredit(address account, uint256 amount) external returns (uint256 allowance); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; interface IResolver { function resolveOrders(address resolver, bytes calldata tokensAndAmounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@1inch/limit-order-protocol-contract/contracts/interfaces/IInteractionNotificationReceiver.sol"; import "./IFeeBankCharger.sol"; interface ISettlement is IInteractionNotificationReceiver, IFeeBankCharger { function settleOrders(bytes calldata order) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@1inch/solidity-utils/contracts/libraries/AddressLib.sol"; import "./TakingFee.sol"; // layout of dynamic suffix is as follows: // 0x00 - 0x19: totalFee // 0x20 - 0x39: resolver // 0x40 - 0x59: token // 0x60 - 0x79: rateBump // 0x80 - 0x99: takingFee // 0xa0 - 0x..: tokensAndAmounts bytes // 0x.. - 0x..: tokensAndAmounts length in bytes library DynamicSuffix { struct Data { uint256 totalFee; Address resolver; Address token; uint256 rateBump; TakingFee.Data takingFee; } uint256 internal constant _STATIC_DATA_SIZE = 0xa0; function decodeSuffix(bytes calldata cd) internal pure returns(Data calldata suffix, bytes calldata tokensAndAmounts, bytes calldata interaction) { assembly { let lengthOffset := sub(add(cd.offset, cd.length), 0x20) tokensAndAmounts.length := calldataload(lengthOffset) tokensAndAmounts.offset := sub(lengthOffset, tokensAndAmounts.length) suffix := sub(tokensAndAmounts.offset, _STATIC_DATA_SIZE) interaction.offset := add(cd.offset, 1) interaction.length := sub(suffix, interaction.offset) } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /// @title Library for parsing parameters from salt. library OrderSaltParser { uint256 private constant _TIME_START_MASK = 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000; // prettier-ignore uint256 private constant _DURATION_MASK = 0x00000000FFFFFF00000000000000000000000000000000000000000000000000; // prettier-ignore uint256 private constant _INITIAL_RATE_BUMP_MASK = 0x00000000000000FFFFFF00000000000000000000000000000000000000000000; // prettier-ignore uint256 private constant _FEE_MASK = 0x00000000000000000000FFFFFFFF000000000000000000000000000000000000; // prettier-ignore uint256 private constant _SALT_MASK = 0x0000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore uint256 private constant _TIME_START_SHIFT = 224; // orderTimeMask 224-255 uint256 private constant _DURATION_SHIFT = 200; // durationMask 200-223 uint256 private constant _INITIAL_RATE_BUMP_SHIFT = 176; // initialRateMask 176-200 uint256 private constant _FEE_SHIFT = 144; // orderFee 144-175 function getStartTime(uint256 salt) internal pure returns (uint256) { return (salt & _TIME_START_MASK) >> _TIME_START_SHIFT; } function getDuration(uint256 salt) internal pure returns (uint256) { return (salt & _DURATION_MASK) >> _DURATION_SHIFT; } function getInitialRateBump(uint256 salt) internal pure returns (uint256) { return (salt & _INITIAL_RATE_BUMP_MASK) >> _INITIAL_RATE_BUMP_SHIFT; } function getFee(uint256 salt) internal pure returns (uint256) { return (salt & _FEE_MASK) >> _FEE_SHIFT; } function getSalt(uint256 salt) internal pure returns (uint256) { return salt & _SALT_MASK; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@1inch/limit-order-protocol-contract/contracts/OrderLib.sol"; import "./OrderSaltParser.sol"; import "./TakingFee.sol"; import "hardhat/console.sol"; // Placed in the end of the order interactions data // Last byte contains flags and lengths, can have up to 15 resolvers and 7 points library OrderSuffix { using OrderSaltParser for uint256; // `Order.interactions` suffix structure: // M*(2 + 3 bytes) - auction points coefficients with seconds delays // N*(4 + 20 bytes) - resolver with corresponding time limit // 4 bytes - public time limit // 32 bytes - taking fee (optional if flags has _HAS_TAKING_FEE_FLAG) // 1 bytes - flags uint256 private constant _HAS_TAKING_FEE_FLAG = 0x80; uint256 private constant _RESOLVERS_LENGTH_MASK = 0x78; uint256 private constant _RESOLVERS_LENGTH_BIT_SHIFT = 3; uint256 private constant _POINTS_LENGTH_MASK = 0x07; uint256 private constant _POINTS_LENGTH_BIT_SHIFT = 0; uint256 private constant _TAKING_FEE_BYTES_SIZE = 32; uint256 private constant _PUBLIC_TIME_LIMIT_BYTES_SIZE = 4; uint256 private constant _PUBLIC_TIME_LIMIT_BIT_SHIFT = 224; // 256 - _PUBLIC_TIME_LIMIT_BYTES_SIZE * 8 uint256 private constant _AUCTION_POINT_DELAY_BYTES_SIZE = 2; uint256 private constant _AUCTION_POINT_BUMP_BYTES_SIZE = 3; uint256 private constant _AUCTION_POINT_BYTES_SIZE = 5; // _AUCTION_POINT_DELAY_BYTES_SIZE + _AUCTION_POINT_BUMP_BYTES_SIZE; uint256 private constant _AUCTION_POINT_DELAY_BIT_SHIFT = 240; // 256 - _AUCTION_POINT_DELAY_BYTES_SIZE * 8; uint256 private constant _AUCTION_POINT_BUMP_BIT_SHIFT = 232; // 256 - _AUCTION_POINT_BUMP_BYTES_SIZE * 8; uint256 private constant _RESOLVER_TIME_LIMIT_BYTES_SIZE = 4; uint256 private constant _RESOLVER_ADDRESS_BYTES_SIZE = 20; uint256 private constant _RESOLVER_BYTES_SIZE = 24; // _RESOLVER_TIME_LIMIT_BYTES_SIZE + _RESOLVER_ADDRESS_BYTES_SIZE; uint256 private constant _RESOLVER_TIME_LIMIT_BIT_SHIFT = 224; // 256 - _RESOLVER_TIME_LIMIT_BYTES_SIZE * 8; uint256 private constant _RESOLVER_ADDRESS_BIT_SHIFT = 96; // 256 - _RESOLVER_ADDRESS_BYTES_SIZE * 8; function takingFee(OrderLib.Order calldata order) internal pure returns (TakingFee.Data ret) { bytes calldata interactions = order.interactions; assembly { let ptr := sub(add(interactions.offset, interactions.length), 1) if and(_HAS_TAKING_FEE_FLAG, byte(0, calldataload(ptr))) { ret := calldataload(sub(ptr, _TAKING_FEE_BYTES_SIZE)) } } } function checkResolver(OrderLib.Order calldata order, address resolver) internal view returns (bool valid) { bytes calldata interactions = order.interactions; uint256 gas = gasleft(); uint256 resolversCount; assembly { let ptr := sub(add(interactions.offset, interactions.length), 1) let flags := byte(0, calldataload(ptr)) ptr := sub(ptr, _PUBLIC_TIME_LIMIT_BYTES_SIZE) if and(flags, _HAS_TAKING_FEE_FLAG) { ptr := sub(ptr, _TAKING_FEE_BYTES_SIZE) } resolversCount := shr(_RESOLVERS_LENGTH_BIT_SHIFT, and(flags, _RESOLVERS_LENGTH_MASK)) // Check public time limit let publicLimit := shr(_PUBLIC_TIME_LIMIT_BIT_SHIFT, calldataload(ptr)) valid := gt(timestamp(), publicLimit) // Check resolvers and corresponding time limits if iszero(valid) { for { let end := sub(ptr, mul(_RESOLVER_BYTES_SIZE, resolversCount)) } gt(ptr, end) { } { ptr := sub(ptr, _RESOLVER_ADDRESS_BYTES_SIZE) let account := shr(_RESOLVER_ADDRESS_BIT_SHIFT, calldataload(ptr)) ptr := sub(ptr, _RESOLVER_TIME_LIMIT_BYTES_SIZE) let limit := shr(_RESOLVER_TIME_LIMIT_BIT_SHIFT, calldataload(ptr)) if eq(account, resolver) { valid := iszero(lt(timestamp(), limit)) break } } } } console.log('gas used:', gas - gasleft(), resolversCount); } function rateBump(OrderLib.Order calldata order) internal view returns (uint256 bump) { uint256 startBump = order.salt.getInitialRateBump(); uint256 cumulativeTime = order.salt.getStartTime(); uint256 lastTime = cumulativeTime + order.salt.getDuration(); if (block.timestamp <= cumulativeTime) { return startBump; } else if (block.timestamp >= lastTime) { return 0; } bytes calldata interactions = order.interactions; assembly { function linearInterpolation(t1, t2, v1, v2, t) -> v { v := div( add(mul(sub(t, t1), v2), mul(sub(t2, t), v1)), sub(t2, t1) ) } let ptr := sub(add(interactions.offset, interactions.length), 1) // move ptr to the last point let pointsCount { // stack too deep let flags := byte(0, calldataload(ptr)) let resolversCount := shr(_RESOLVERS_LENGTH_BIT_SHIFT, and(flags, _RESOLVERS_LENGTH_MASK)) pointsCount := and(flags, _POINTS_LENGTH_MASK) if and(flags, _HAS_TAKING_FEE_FLAG) { ptr := sub(ptr, _TAKING_FEE_BYTES_SIZE) } ptr := sub(ptr, add(mul(_RESOLVER_BYTES_SIZE, resolversCount), _PUBLIC_TIME_LIMIT_BYTES_SIZE)) // 24 byte for each wl entry + 4 bytes for public time limit } // Check points sequentially let prevCoefficient := startBump let prevCumulativeTime := cumulativeTime for { let end := sub(ptr, mul(_AUCTION_POINT_BYTES_SIZE, pointsCount)) } gt(ptr, end) { } { ptr := sub(ptr, _AUCTION_POINT_BUMP_BYTES_SIZE) let coefficient := shr(_AUCTION_POINT_BUMP_BIT_SHIFT, calldataload(ptr)) ptr := sub(ptr, _AUCTION_POINT_DELAY_BYTES_SIZE) let delay := shr(_AUCTION_POINT_DELAY_BIT_SHIFT, calldataload(ptr)) cumulativeTime := add(cumulativeTime, delay) if gt(cumulativeTime, timestamp()) { // prevCumulativeTime <passed> time <elapsed> cumulativeTime // prevCoefficient <passed> X <elapsed> coefficient bump := linearInterpolation( prevCumulativeTime, cumulativeTime, prevCoefficient, coefficient, timestamp() ) break } prevCumulativeTime := cumulativeTime prevCoefficient := coefficient } if iszero(bump) { bump := linearInterpolation( prevCumulativeTime, lastTime, prevCoefficient, 0, timestamp() ) } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; library TakingFee { type Data is uint256; uint256 internal constant _TAKING_FEE_BASE = 1e9; uint256 private constant _TAKING_FEE_RATIO_OFFSET = 160; function enabled(Data self) internal pure returns (bool) { return ratio(self) != 0; } function ratio(Data self) internal pure returns (uint256) { return uint32(Data.unwrap(self) >> _TAKING_FEE_RATIO_OFFSET); } function receiver(Data self) internal pure returns (address) { return address(uint160(Data.unwrap(self))); } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal view { _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 view { _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 view { _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 view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal view { _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 view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IOrderMixin","name":"limitOrderProtocol","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"FailedExternalCall","type":"error"},{"inputs":[],"name":"ForceApproveFailed","type":"error"},{"inputs":[],"name":"IncorrectCalldataParams","type":"error"},{"inputs":[],"name":"NotEnoughCredit","type":"error"},{"inputs":[],"name":"OnlyFeeBankAccess","type":"error"},{"inputs":[],"name":"ResolverIsNotWhitelisted","type":"error"},{"inputs":[],"name":"SafeTransferFailed","type":"error"},{"inputs":[],"name":"WrongInteractionTarget","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"availableCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"decreaseAvailableCredit","outputs":[{"internalType":"uint256","name":"allowance","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeBank","outputs":[{"internalType":"contract IFeeBank","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"takingAmount","type":"uint256"},{"internalType":"bytes","name":"interactiveData","type":"bytes"}],"name":"fillOrderInteraction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increaseAvailableCredit","outputs":[{"internalType":"uint256","name":"allowance","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"settleOrders","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162002501380380620025018339810160408190526200003491620000c9565b803081336040516200004690620000a2565b6001600160a01b03938416815291831660208301529091166040820152606001604051809103906000f08015801562000083573d6000803e3d6000fd5b506001600160a01b039081166080529290921660a05250620001089050565b6110e5806200141c83390190565b6001600160a01b0381168114620000c657600080fd5b50565b60008060408385031215620000dd57600080fd5b8251620000ea81620000b0565b6020840151909250620000fd81620000b0565b809150509250929050565b60805160a0516112d26200014a6000396000818161035e015281816106a7015261078201526000818161010001528181610197015261023c01526112d26000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806385eda2de1161005057806385eda2de146100e8578063af15d786146100fb578063ccee33d71461014757600080fd5b80630965d04b146100775780633ee5ef1f1461008c5780635886216f146100b2575b600080fd5b61008a610085366004610e91565b61015a565b005b61009f61009a366004610efc565b61017d565b6040519081526020015b60405180910390f35b61009f6100c0366004610f26565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61009f6100f6366004610efc565b610222565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a9565b61009f610155366004610f48565b6102f4565b60408051600080825260208201909252610179918491849133916106de565b5050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101ee576040517fa454419900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff90911660009081526020819052604090208054919091019081905590565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610293576040517fa454419900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020546102c4828261100e565b73ffffffffffffffffffffffffffffffffffffffff90931660009081526020819052604090208390555090919050565b60008573ffffffffffffffffffffffffffffffffffffffff81163014610346576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146103b5576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8284017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081810135918290037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40810192918101919060018801908881037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3f01907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081013590629896809061048c907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0013582611027565b610496908d61103a565b6104a09190611051565b97506000633b9aca006104c063ffffffff60808a013560a01c168b61103a565b6104ca9190611051565b905060006104d9866040611027565b67ffffffffffffffff8111156104f1576104f1610fb0565b6040519080825280601f01601f19166020018201604052801561051b576020820181803683370190505b509050602081018688823786018381528a83016020909101527f01000000000000000000000000000000000000000000000000000000000000008c8c6000816105665761056661108c565b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361064e576105a6602089013589356108a6565b60006105b285876110bb565b60601c90503660006105c7876014818b611103565b915091508273ffffffffffffffffffffffffffffffffffffffff16631944799f6105f28d6020013590565b8685856040518563ffffffff1660e01b81526004016106149493929190611191565b600060405180830381600087803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b50505050505050610660565b610660858560208b01358b35856106de565b811561068b5761068b73ffffffffffffffffffffffffffffffffffffffff841660808a013584610939565b6106cc73ffffffffffffffffffffffffffffffffffffffff84167f00000000000000000000000000000000000000000000000000000000000000008c6109a0565b50505050505050505095945050505050565b843585016106ec8185610a69565b610722576040517f4b57606900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061072d82610bc7565b905061074a66038d7ea4c6800063ffffffff843560901c1661103a565b6107549085611027565b9350600061076183610c00565b90506000845160a06107739190611027565b61077e906020611027565b90507f00000000000000000000000000000000000000000000000000000000000000006107b4565b8281848460045afa50505050565b60408a013560208101818c0135818d013560601c30811415601483101715610800577f5b34bf890000000000000000000000000000000000000000000000000000000060005260046000fd5b506040517fe5d7bde60000000000000000000000000000000000000000000000000000000081528c8e600483013785820160048583010152818382010193508a60048501528b60248501526040890135604485015286606485015287608485015289516108748160208d0160a488016107a6565b84810160a40152600081878f016004018183895af1610896573d6000823e3d81fd5b5050505050505050505050505050565b80156101795773ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561090c576040517fa7fd379200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff92909216600090815260208190526040902091039055565b610965837fa9059cbb000000000000000000000000000000000000000000000000000000008484610d45565b61099b576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6109cc837f095ea7b3000000000000000000000000000000000000000000000000000000008484610d45565b61099b576109fd837f095ea7b300000000000000000000000000000000000000000000000000000000846000610d45565b1580610a325750610a30837f095ea7b3000000000000000000000000000000000000000000000000000000008484610d45565b155b1561099b576040517f19be9a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003681610a7b610120860186611212565b9150915060005a905060008284017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb8101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0135821a6080811615610ae2576020820391505b813560e01c4211965060031c600f16915085610b72578160180281035b80821115610b70577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe88201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec013560601c823560e01c898203610b69574210159750610b709050565b5050610aff565b505b50610bbd6040518060400160405280600981526020017f67617320757365643a00000000000000000000000000000000000000000000008152505a610bb7908561100e565b83610d99565b5050505092915050565b60003681610bd9610120850185611212565b91509150600181830103803560001a60801615610bf857602081033593505b505050919050565b600062ffffff823560b081901c82169160e082901c918491610c269160c81c1683611027565b9050814211610c385750909392505050565b804210610c4a57506000949350505050565b366000610c5b610120880188611212565b915091506001818301036000813560001a6078811660031c6007821692506080821615610c89576020840393505b6004816018020184039350505086868260050284035b80851115610d25577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb8501803560f01c9990990198947ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd013560e81c428a1115610d1b57828a03428481038302908c03860201049b5050610d25565b9250889150610c9f565b5089610d375780870342880383020499505b505050505050505050919050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610d91573d8015610d8757600160005114601f3d11169150610d8f565b6000863b1191505b505b949350505050565b61099b838383604051602401610db193929190611277565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fca47c4eb0000000000000000000000000000000000000000000000000000000017905280516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b60008083601f840112610e5a57600080fd5b50813567ffffffffffffffff811115610e7257600080fd5b602083019150836020828501011115610e8a57600080fd5b9250929050565b60008060208385031215610ea457600080fd5b823567ffffffffffffffff811115610ebb57600080fd5b610ec785828601610e48565b90969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ef757600080fd5b919050565b60008060408385031215610f0f57600080fd5b610f1883610ed3565b946020939093013593505050565b600060208284031215610f3857600080fd5b610f4182610ed3565b9392505050565b600080600080600060808688031215610f6057600080fd5b610f6986610ed3565b94506020860135935060408601359250606086013567ffffffffffffffff811115610f9357600080fd5b610f9f88828901610e48565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561102157611021610fdf565b92915050565b8082018082111561102157611021610fdf565b808202811582820484141761102157611021610fdf565b600082611087577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156110fb5780818660140360031b1b83161692505b505092915050565b6000808585111561111357600080fd5b8386111561112057600080fd5b5050820193919092039150565b6000815180845260005b8181101561115357602081850181015186830182015201611137565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff851681526060602082015260006111c0606083018661112d565b82810360408401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011682010191505095945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261124757600080fd5b83018035915067ffffffffffffffff82111561126257600080fd5b602001915036819003821315610e8a57600080fd5b60608152600061128a606083018661112d565b6020830194909452506040015291905056fea264697066735822122048b7d90c0d5bdff135776116c34d936e4019f2176bed144c2ee8beab8c48263964736f6c6343000811003360c06040523480156200001157600080fd5b50604051620010e5380380620010e58339810160408190526200003491620001fd565b6200003f33620000b6565b6001600160a01b038316620000675760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382166200008f5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0380841660a0528216608052620000ad8162000106565b50505062000251565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200011062000189565b6001600160a01b0381166200017b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6200018681620000b6565b50565b6000546001600160a01b03163314620001e55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000172565b565b6001600160a01b03811681146200018657600080fd5b6000806000606084860312156200021357600080fd5b83516200022081620001e7565b60208501519093506200023381620001e7565b60408501519092506200024681620001e7565b809150509250925092565b60805160a051610e44620002a16000396000818161028b015281816103a0015281816105a90152610778015260008181610207015281816104640152818161064801526106ed0152610e446000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063715018a611610081578063b6b55f251161005b578063b6b55f2514610185578063bfe9173414610198578063f2fde38b146101ab57600080fd5b8063715018a6146101405780638da5cb5b1461014a57806397a2cb641461017257600080fd5b80632f4f21e2116100b25780632f4f21e21461010757806332d323a51461011a5780635886216f1461012d57600080fd5b8063205c2878146100ce5780632e1a7d4d146100f4575b600080fd5b6100e16100dc366004610b67565b6101be565b6040519081526020015b60405180910390f35b6100e1610102366004610b91565b6101d3565b6100e1610115366004610b67565b6101df565b6100e1610128366004610bf3565b6101eb565b6100e161013b366004610c4d565b610243565b6101486102f8565b005b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100eb565b6100e1610180366004610c97565b61030c565b6100e1610193366004610b91565b610491565b6100e16101a6366004610d7a565b61049d565b6101486101b9366004610c4d565b6104b5565b60006101ca8383610571565b90505b92915050565b60006101cd3383610571565b60006101ca8383610684565b600061022e73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001684846107e7565b6102388585610684565b90505b949350505050565b6040517f5886216f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690635886216f90602401602060405180830381865afa1580156102d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd9190610dc6565b610300610803565b61030a6000610884565b565b6000610316610803565b815160005b8181101561044957600084828151811061033757610337610ddf565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff8082166000818152600190945260408085205490517f5886216f00000000000000000000000000000000000000000000000000000000815260048101929092529294509192917f000000000000000000000000000000000000000000000000000000000000000090911690635886216f90602401602060405180830381865afa1580156103e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040d9190610dc6565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600160208190526040909120849055929091039490940193500161031b565b5061048b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633846108f9565b50919050565b60006101cd3383610684565b60006104ab338585856101eb565b90505b9392505050565b6104bd610803565b73ffffffffffffffffffffffffffffffffffffffff8116610565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61056e81610884565b50565b6040517f85eda2de000000000000000000000000000000000000000000000000000000008152336004820152602481018290526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906385eda2de906044016020604051808303816000875af1158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610dc6565b3360009081526001602052604090208054849003905590506101cd7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1684846108f9565b600073ffffffffffffffffffffffffffffffffffffffff83166106d3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61071573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308561095b565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602052604090819020805486019055517f3ee5ef1f0000000000000000000000000000000000000000000000000000000081526004810191909152602481018490527f000000000000000000000000000000000000000000000000000000000000000090911690633ee5ef1f906044016020604051808303816000875af11580156107c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ca9190610dc6565b6107f28383836109f8565b6107fe576107fe610a9e565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461030a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161055c565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610925837fa9059cbb000000000000000000000000000000000000000000000000000000008484610aaa565b6107fe576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006323b872dd60e01b905060006040518281528560048201528460248201528360448201526020600060648360008b5af191505080156109b9573d80156109af57600160005114601f3d111691506109b7565b6000873b1191505b505b806109f0576040517ff405907100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b600060e0829003610a3657610a2f847fd505accf000000000000000000000000000000000000000000000000000000008585610afd565b90506104ae565b610100829003610a6c57610a2f847f8fcbaf0c000000000000000000000000000000000000000000000000000000008585610afd565b6040517f6827585700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040513d6000823e3d81fd5b60006040518481528360048201528260248201526020600060448360008a5af1915050801561023b573d8015610aec57600160005114601f3d11169150610af4565b6000863b1191505b50949350505050565b6000816004016040518581528385600483013760206000838360008b5af192505050801561023b573d8015610aec57600160005114601f3d11169150610af4565b803573ffffffffffffffffffffffffffffffffffffffff81168114610b6257600080fd5b919050565b60008060408385031215610b7a57600080fd5b610b8383610b3e565b946020939093013593505050565b600060208284031215610ba357600080fd5b5035919050565b60008083601f840112610bbc57600080fd5b50813567ffffffffffffffff811115610bd457600080fd5b602083019150836020828501011115610bec57600080fd5b9250929050565b60008060008060608587031215610c0957600080fd5b610c1285610b3e565b935060208501359250604085013567ffffffffffffffff811115610c3557600080fd5b610c4187828801610baa565b95989497509550505050565b600060208284031215610c5f57600080fd5b6101ca82610b3e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60006020808385031215610caa57600080fd5b823567ffffffffffffffff80821115610cc257600080fd5b818501915085601f830112610cd657600080fd5b813581811115610ce857610ce8610c68565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108582111715610d2b57610d2b610c68565b604052918252848201925083810185019188831115610d4957600080fd5b938501935b82851015610d6e57610d5f85610b3e565b84529385019392850192610d4e565b98975050505050505050565b600080600060408486031215610d8f57600080fd5b83359250602084013567ffffffffffffffff811115610dad57600080fd5b610db986828701610baa565b9497909650939450505050565b600060208284031215610dd857600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212208d58d4bb957ed2fe42a7ba782899d50c9dc88ce2310ca1b0e54f0e02540a897a64736f6c634300081100330000000000000000000000001111111254eeb25477b68fb85ed929f73a960582000000000000000000000000b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100725760003560e01c806385eda2de1161005057806385eda2de146100e8578063af15d786146100fb578063ccee33d71461014757600080fd5b80630965d04b146100775780633ee5ef1f1461008c5780635886216f146100b2575b600080fd5b61008a610085366004610e91565b61015a565b005b61009f61009a366004610efc565b61017d565b6040519081526020015b60405180910390f35b61009f6100c0366004610f26565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61009f6100f6366004610efc565b610222565b6101227f000000000000000000000000c67da57f31523710a57eb17b623c8b825b1af45781565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a9565b61009f610155366004610f48565b6102f4565b60408051600080825260208201909252610179918491849133916106de565b5050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c67da57f31523710a57eb17b623c8b825b1af45716146101ee576040517fa454419900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff90911660009081526020819052604090208054919091019081905590565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c67da57f31523710a57eb17b623c8b825b1af4571614610293576040517fa454419900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020546102c4828261100e565b73ffffffffffffffffffffffffffffffffffffffff90931660009081526020819052604090208390555090919050565b60008573ffffffffffffffffffffffffffffffffffffffff81163014610346576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058216146103b5576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8284017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081810135918290037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff40810192918101919060018801908881037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3f01907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8081013590629896809061048c907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0013582611027565b610496908d61103a565b6104a09190611051565b97506000633b9aca006104c063ffffffff60808a013560a01c168b61103a565b6104ca9190611051565b905060006104d9866040611027565b67ffffffffffffffff8111156104f1576104f1610fb0565b6040519080825280601f01601f19166020018201604052801561051b576020820181803683370190505b509050602081018688823786018381528a83016020909101527f01000000000000000000000000000000000000000000000000000000000000008c8c6000816105665761056661108c565b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361064e576105a6602089013589356108a6565b60006105b285876110bb565b60601c90503660006105c7876014818b611103565b915091508273ffffffffffffffffffffffffffffffffffffffff16631944799f6105f28d6020013590565b8685856040518563ffffffff1660e01b81526004016106149493929190611191565b600060405180830381600087803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b50505050505050610660565b610660858560208b01358b35856106de565b811561068b5761068b73ffffffffffffffffffffffffffffffffffffffff841660808a013584610939565b6106cc73ffffffffffffffffffffffffffffffffffffffff84167f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605828c6109a0565b50505050505050505095945050505050565b843585016106ec8185610a69565b610722576040517f4b57606900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061072d82610bc7565b905061074a66038d7ea4c6800063ffffffff843560901c1661103a565b6107549085611027565b9350600061076183610c00565b90506000845160a06107739190611027565b61077e906020611027565b90507f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826107b4565b8281848460045afa50505050565b60408a013560208101818c0135818d013560601c30811415601483101715610800577f5b34bf890000000000000000000000000000000000000000000000000000000060005260046000fd5b506040517fe5d7bde60000000000000000000000000000000000000000000000000000000081528c8e600483013785820160048583010152818382010193508a60048501528b60248501526040890135604485015286606485015287608485015289516108748160208d0160a488016107a6565b84810160a40152600081878f016004018183895af1610896573d6000823e3d81fd5b5050505050505050505050505050565b80156101795773ffffffffffffffffffffffffffffffffffffffff82166000908152602081905260409020548181101561090c576040517fa7fd379200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff92909216600090815260208190526040902091039055565b610965837fa9059cbb000000000000000000000000000000000000000000000000000000008484610d45565b61099b576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6109cc837f095ea7b3000000000000000000000000000000000000000000000000000000008484610d45565b61099b576109fd837f095ea7b300000000000000000000000000000000000000000000000000000000846000610d45565b1580610a325750610a30837f095ea7b3000000000000000000000000000000000000000000000000000000008484610d45565b155b1561099b576040517f19be9a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003681610a7b610120860186611212565b9150915060005a905060008284017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb8101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0135821a6080811615610ae2576020820391505b813560e01c4211965060031c600f16915085610b72578160180281035b80821115610b70577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe88201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec013560601c823560e01c898203610b69574210159750610b709050565b5050610aff565b505b50610bbd6040518060400160405280600981526020017f67617320757365643a00000000000000000000000000000000000000000000008152505a610bb7908561100e565b83610d99565b5050505092915050565b60003681610bd9610120850185611212565b91509150600181830103803560001a60801615610bf857602081033593505b505050919050565b600062ffffff823560b081901c82169160e082901c918491610c269160c81c1683611027565b9050814211610c385750909392505050565b804210610c4a57506000949350505050565b366000610c5b610120880188611212565b915091506001818301036000813560001a6078811660031c6007821692506080821615610c89576020840393505b6004816018020184039350505086868260050284035b80851115610d25577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb8501803560f01c9990990198947ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd013560e81c428a1115610d1b57828a03428481038302908c03860201049b5050610d25565b9250889150610c9f565b5089610d375780870342880383020499505b505050505050505050919050565b60006040518481528360048201528260248201526020600060448360008a5af19150508015610d91573d8015610d8757600160005114601f3d11169150610d8f565b6000863b1191505b505b949350505050565b61099b838383604051602401610db193929190611277565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fca47c4eb0000000000000000000000000000000000000000000000000000000017905280516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b60008083601f840112610e5a57600080fd5b50813567ffffffffffffffff811115610e7257600080fd5b602083019150836020828501011115610e8a57600080fd5b9250929050565b60008060208385031215610ea457600080fd5b823567ffffffffffffffff811115610ebb57600080fd5b610ec785828601610e48565b90969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ef757600080fd5b919050565b60008060408385031215610f0f57600080fd5b610f1883610ed3565b946020939093013593505050565b600060208284031215610f3857600080fd5b610f4182610ed3565b9392505050565b600080600080600060808688031215610f6057600080fd5b610f6986610ed3565b94506020860135935060408601359250606086013567ffffffffffffffff811115610f9357600080fd5b610f9f88828901610e48565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561102157611021610fdf565b92915050565b8082018082111561102157611021610fdf565b808202811582820484141761102157611021610fdf565b600082611087577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156110fb5780818660140360031b1b83161692505b505092915050565b6000808585111561111357600080fd5b8386111561112057600080fd5b5050820193919092039150565b6000815180845260005b8181101561115357602081850181015186830182015201611137565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff851681526060602082015260006111c0606083018661112d565b82810360408401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011682010191505095945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261124757600080fd5b83018035915067ffffffffffffffff82111561126257600080fd5b602001915036819003821315610e8a57600080fd5b60608152600061128a606083018661112d565b6020830194909452506040015291905056fea264697066735822122048b7d90c0d5bdff135776116c34d936e4019f2176bed144c2ee8beab8c48263964736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582000000000000000000000000b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e
-----Decoded View---------------
Arg [0] : limitOrderProtocol (address): 0x1111111254EEB25477B68fb85Ed929f73A960582
Arg [1] : token (address): 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
Arg [1] : 000000000000000000000000b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.