Address: 0x6166c1952c54dEd6b070B4616797E61b6c48A117
Balance (XRP): 0 XRP
Bytecode: 0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c638c7080c90361000e5760c03660031901126102b3576004356001600160a01b03811681036102b35760243567ffffffffffffffff81116102b35761006a9036906004016102d3565b909160443567ffffffffffffffff81116102b35761008c9036906004016102d3565b93909260643567ffffffffffffffff81116102b3576100af9036906004016102d3565b959060843567ffffffffffffffff81116102b3576100d19036906004016102d3565b9167ffffffffffffffff60a435116102b3576100f23660a4356004016102d3565b9490958181148015906102c9575b6102b85760005b818110610142574761011557005b600080808047818115610139575b3390f11561012d57005b6040513d6000823e3d90fd5b506108fc610123565b8a898d61016984610161818961015a828b4799610304565b3597610304565b359289610304565b35906001600160a01b03821682036102b3576001600160a01b038e163b156102b35760405163735eb90760e11b8152600481019490945260248401526001600160a01b0316604483015260a0606483015260a482018890526001600160fb1b0388116102b357818c60e48a60051b8c60c491808d84880137850191820160c086840301608487015252018c60005b8d811061027757506000949184900392849291506001600160a01b03165af1801561012d57610249575b50600019811461023357600101610107565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff81116102615760405238610221565b634e487b7160e01b600052604160045260246000fd5b90935091508235906001600160a01b03821682036102b3576001600160a01b03909116815284928f9260209283019291909101906001016101f7565b600080fd5b6355ca07b760e11b60805260046080fd5b508a811415610100565b9181601f840112156102b35782359167ffffffffffffffff83116102b3576020808501948460051b0101116102b357565b91908110156103145760051b0190565b634e487b7160e01b600052603260045260246000fdfea26469706673582212203d65e458361e6ed154313c1fee4d625f6539a08b82ac3d52e9e20033e8b8691c64736f6c63430008130033
BatchPayableHelper.sol
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.19; import {ISequenceMarketFunctions} from "./interfaces/ISequenceMarket.sol"; error InvalidBatchRequest(); contract BatchPayableHelper { /** * Accepts requests. * @param market The market to accept requests on. * @param requestIds The IDs of the requests. * @param quantities The quantities of tokens to accept. * @param recipients The recipients of the accepted tokens. * @param additionalFees The additional fees to pay. * @param additionalFeeRecipients The addresses to send the additional fees to. * @dev Additional fees are applied to each request. */ function acceptRequestBatch( ISequenceMarketFunctions market, uint256[] calldata requestIds, uint256[] calldata quantities, address[] calldata recipients, uint256[] calldata additionalFees, address[] calldata additionalFeeRecipients ) external payable { if (requestIds.length != quantities.length || requestIds.length != recipients.length) { revert InvalidBatchRequest(); } for (uint256 i = 0; i < requestIds.length; i++) { market.acceptRequest{value: address(this).balance}( requestIds[i], quantities[i], recipients[i], additionalFees, additionalFeeRecipients ); } // Return any remaining ETH if (address(this).balance > 0) { payable(msg.sender).transfer(address(this).balance); } } receive() external payable {} }
ISequenceMarket.sol
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.19; interface ISequenceMarketStorage { /** * Request parameters. * @param isListing True if the request is a listing, false if it is an offer. * @param isERC1155 True if the token is an ERC1155 token, false if it is an ERC721 token. * @param tokenContract The address of the token contract. * @param tokenId The ID of the token. * @param quantity The quantity of tokens. * @param expiry The expiry of the request. * @param currency The address of the currency. address(0) for native token. * @param pricePerToken The price per token, including royalty fees. */ struct RequestParams { bool isListing; bool isERC1155; address tokenContract; uint256 tokenId; uint256 quantity; uint96 expiry; address currency; uint256 pricePerToken; } /** * Request storage. * @param creator The address of the request creator. * @param isListing True if the request is a listing, false if it is an offer. * @param isERC1155 True if the token is an ERC1155 token, false if it is an ERC721 token. * @param tokenContract The address of the token contract. * @param tokenId The ID of the token. * @param quantity The quantity of tokens. * @param expiry The expiry of the request. * @param currency The address of the currency. address(0) for native token. * @param pricePerToken The price per token, including royalty fees. */ struct Request { address creator; bool isListing; bool isERC1155; address tokenContract; uint256 tokenId; uint256 quantity; uint96 expiry; address currency; uint256 pricePerToken; } /** * Custom royalty parameters. * @param recipient Address to send the fees to. * @param fee Fee percentage with a 10000 basis (e.g. 0.3% is 30 and 1% is 100 and 100% is 10000). * @dev Used to store custom royalty settings for contracts do not support ERC2981. */ struct CustomRoyalty { address recipient; uint96 fee; } } interface ISequenceMarketFunctions is ISequenceMarketStorage { /** * Creates a request. * @param request The request's details. * @return requestId The ID of the request. * @notice A listing is when the maker is selling tokens for currency. * @notice An offer is when the maker is buying tokens with currency. */ function createRequest(RequestParams calldata request) external returns (uint256 requestId); /** * Creates requests. * @param requests The requests' details. * @return requestIds The IDs of the requests. */ function createRequestBatch(RequestParams[] calldata requests) external returns (uint256[] memory requestIds); /** * Accepts a request. * @param requestId The ID of the request. * @param quantity The quantity of tokens to accept. * @param recipient The recipient of the accepted tokens. * @param additionalFees The additional fees to pay. * @param additionalFeeRecipients The addresses to send the additional fees to. */ function acceptRequest( uint256 requestId, uint256 quantity, address recipient, uint256[] calldata additionalFees, address[] calldata additionalFeeRecipients ) external payable; /** * Accepts requests. * @param requestIds The IDs of the requests. * @param quantities The quantities of tokens to accept. * @param recipients The recipients of the accepted tokens. * @param additionalFees The additional fees to pay. * @param additionalFeeRecipients The addresses to send the additional fees to. * @dev Additional fees are applied to each request. */ function acceptRequestBatch( uint256[] calldata requestIds, uint256[] calldata quantities, address[] calldata recipients, uint256[] calldata additionalFees, address[] calldata additionalFeeRecipients ) external; /** * Cancels a request. * @param requestId The ID of the request. */ function cancelRequest(uint256 requestId) external; /** * Cancels requests. * @param requestIds The IDs of the requests. */ function cancelRequestBatch(uint256[] calldata requestIds) external; /** * Gets a request. * @param requestId The ID of the request. * @return request The request. */ function getRequest(uint256 requestId) external view returns (Request memory request); /** * Gets requests. * @param requestIds The IDs of the requests. * @return requests The requests. */ function getRequestBatch(uint256[] calldata requestIds) external view returns (Request[] memory requests); /** * Invalidates all current requests for the msg.sender. */ function invalidateRequests() external; /** * Invalidates all current requests for a given `tokenContract` for the msg.sender. */ function invalidateRequests(address tokenContract) external; /** * Checks if a request is valid. * @param requestId The ID of the request. * @param quantity The amount of tokens to exchange. 0 is assumed to be the request's available quantity. * @return valid The validity of the request. * @return request The request. * @notice A request is valid if it is active, has not expired and give amount of tokens (currency for offers, tokens for listings) are transferrable. */ function isRequestValid(uint256 requestId, uint256 quantity) external view returns (bool valid, Request memory request); /** * Checks if requests are valid. * @param requestIds The IDs of the requests. * @param quantities The amount of tokens to exchange per request. 0 is assumed to be the request's available quantity. * @return valid The validities of the requests. * @return requests The requests. * @notice A request is valid if it is active, has not expired and give amount of tokens (currency for offers, tokens for listings) are transferrable. */ function isRequestValidBatch(uint256[] calldata requestIds, uint256[] calldata quantities) external view returns (bool[] memory valid, Request[] memory requests); /** * Returns the royalty details for the given token and cost. * @param tokenContract Address of the token being traded. * @param tokenId The ID of the token. * @param cost Amount of currency sent/received for the trade. * @return recipient Address to send royalties to. * @return royalty Amount of currency to be paid as royalties. */ function getRoyaltyInfo(address tokenContract, uint256 tokenId, uint256 cost) external view returns (address recipient, uint256 royalty); } interface ISequenceMarketSignals { // // Events // /// Emitted when a request is created. event RequestCreated( uint256 indexed requestId, address indexed creator, address indexed tokenContract, uint256 tokenId, bool isListing, uint256 quantity, address currency, uint256 pricePerToken, uint256 expiry ); /// Emitted when a request is accepted. event RequestAccepted( uint256 indexed requestId, address indexed buyer, address indexed tokenContract, address recipient, uint256 quantity, uint256 quantityRemaining ); /// Emitted when a request is cancelled. event RequestCancelled(uint256 indexed requestId, address indexed tokenContract); /// Emitted when a user bulk invalidates requests. event RequestsInvalidated(address indexed creator, uint256 indexed invalidatedBefore); /// Emitted when a user bulk invalidates requests. event RequestsInvalidated(address indexed creator, address indexed tokenContract, uint256 indexed invalidatedBefore); /// Emitted when custom royalty settings are changed. event CustomRoyaltyChanged(address indexed tokenContract, address recipient, uint96 fee); // // Errors // /// Thrown when the contract address does not support the required interface. error UnsupportedContractInterface(address contractAddress, bytes4 interfaceId); /// Thrown when the token approval is invalid. error InvalidTokenApproval(address tokenContract, uint256 tokenId, uint256 quantity, address owner); /// Thrown when the currency address is invalid. error InvalidCurrency(); /// Thrown when the currency approval is invalid. error InvalidCurrencyApproval(address currency, uint256 quantity, address owner); /// Thrown when request id is invalid. error InvalidRequestId(uint256 requestId); /// Thrown when the parameters of a batch accept request are invalid. error InvalidBatchRequest(); /// Thrown when quantity is invalid. error InvalidQuantity(); /// Thrown when price is invalid. error InvalidPrice(); /// Thrown when royalty is invalid. error InvalidRoyalty(); /// Thrown when expiry is invalid. error InvalidExpiry(); /// Thrown when request has been explicitly invalidated. error Invalidated(); /// Thrown when the additional fees are invalid. error InvalidAdditionalFees(); } // solhint-disable-next-line no-empty-blocks interface ISequenceMarket is ISequenceMarketFunctions, ISequenceMarketSignals {}
Gas Token: