编译器
0.8.10+commit.fc410830
文件 1 的 13:Address.sol
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 13:AugustusRFQ.sol
pragma solidity 0.8.10;
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./IERC20Permit.sol";
contract AugustusRFQ is EIP712("AUGUSTUS RFQ", "1") {
using SafeERC20 for IERC20;
struct Order {
uint256 nonceAndMeta;
uint128 expiry;
address makerAsset;
address takerAsset;
address maker;
address taker;
uint256 makerAmount;
uint256 takerAmount;
}
struct OrderNFT {
uint256 nonceAndMeta;
uint128 expiry;
uint256 makerAsset;
uint256 makerAssetId;
uint256 takerAsset;
uint256 takerAssetId;
address maker;
address taker;
uint256 makerAmount;
uint256 takerAmount;
}
struct OrderInfo {
Order order;
bytes signature;
uint256 takerTokenFillAmount;
bytes permitTakerAsset;
bytes permitMakerAsset;
}
struct OrderNFTInfo {
OrderNFT order;
bytes signature;
uint256 takerTokenFillAmount;
bytes permitTakerAsset;
bytes permitMakerAsset;
}
uint256 constant public FILLED_ORDER = 1;
uint256 constant public UNFILLED_ORDER = 0;
mapping(address => mapping (bytes32 => uint256)) public remaining;
bytes32 constant public RFQ_LIMIT_ORDER_TYPEHASH = keccak256(
"Order(uint256 nonceAndMeta,uint128 expiry,address makerAsset,address takerAsset,address maker,address taker,uint256 makerAmount,uint256 takerAmount)"
);
bytes32 constant public RFQ_LIMIT_NFT_ORDER_TYPEHASH = keccak256(
"OrderNFT(uint256 nonceAndMeta,uint128 expiry,uint256 makerAsset,uint256 makerAssetId,uint256 takerAsset,uint256 takerAssetId,address maker,address taker,uint256 makerAmount,uint256 takerAmount)"
);
event OrderCancelled(bytes32 indexed orderHash, address indexed maker);
event OrderFilled(
bytes32 indexed orderHash,
address indexed maker,
address makerAsset,
uint256 makerAmount,
address indexed taker,
address takerAsset,
uint256 takerAmount
);
event OrderFilledNFT(
bytes32 indexed orderHash,
address indexed maker,
uint256 makerAsset,
uint256 makerAssetId,
uint256 makerAmount,
address indexed taker,
uint256 takerAsset,
uint256 takerAssetId,
uint256 takerAmount
);
function getRemainingOrderBalance(address maker, bytes32[] calldata orderHashes) external view returns(uint256[] memory remainingBalances) {
remainingBalances = new uint256[](orderHashes.length);
mapping (bytes32 => uint256) storage remainingMaker = remaining[maker];
for (uint i = 0; i < orderHashes.length; i++) {
remainingBalances[i] = remainingMaker[orderHashes[i]];
}
}
function cancelOrders(bytes32[] calldata orderHashes) external {
for (uint256 i = 0; i < orderHashes.length; i++) {
cancelOrder(orderHashes[i]);
}
}
function cancelOrder(bytes32 orderHash) public {
if (_cancelOrder(msg.sender, orderHash)) {
emit OrderCancelled(orderHash, msg.sender);
}
}
function partialFillOrder(
Order calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount
)
external
returns(uint256 makerTokenFilledAmount)
{
return partialFillOrderWithTarget(
order,
signature,
takerTokenFillAmount,
msg.sender
);
}
function partialFillOrderNFT(
OrderNFT calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount
)
external
returns(uint256 makerTokenFilledAmount)
{
return partialFillOrderWithTargetNFT(
order,
signature,
takerTokenFillAmount,
msg.sender
);
}
function partialFillOrderWithTarget(
Order calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount,
address target
)
public
returns(uint256 makerTokenFilledAmount)
{
require(takerTokenFillAmount > 0 && takerTokenFillAmount <= order.takerAmount, "Invalid Taker amount");
makerTokenFilledAmount = (takerTokenFillAmount * order.makerAmount) / order.takerAmount;
require(makerTokenFilledAmount > 0, "Maker token fill amount cannot be 0");
_fillOrder(
order,
signature,
makerTokenFilledAmount,
takerTokenFillAmount,
target
);
return makerTokenFilledAmount;
}
function partialFillOrderWithTargetPermit(
Order calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount,
address target,
bytes calldata permitTakerAsset,
bytes calldata permitMakerAsset
)
public
returns(uint256 makerTokenFilledAmount)
{
require(takerTokenFillAmount > 0 && takerTokenFillAmount <= order.takerAmount, "Invalid Taker amount");
makerTokenFilledAmount = (takerTokenFillAmount * order.makerAmount) / order.takerAmount;
require(makerTokenFilledAmount > 0, "Maker token fill amount cannot be 0");
_permit(order.takerAsset, permitTakerAsset);
_permit(order.makerAsset, permitMakerAsset);
_fillOrder(
order,
signature,
makerTokenFilledAmount,
takerTokenFillAmount,
target
);
return makerTokenFilledAmount;
}
function partialFillOrderWithTargetNFT(
OrderNFT calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount,
address target
)
public
returns(uint256 makerTokenFilledAmount)
{
require(takerTokenFillAmount > 0 && takerTokenFillAmount <= order.takerAmount, "Invalid Taker amount");
makerTokenFilledAmount = (takerTokenFillAmount * order.makerAmount) / order.takerAmount;
require(makerTokenFilledAmount > 0, "Maker token fill amount cannot be 0");
_fillOrderNFT(
order,
signature,
makerTokenFilledAmount,
takerTokenFillAmount,
target
);
return makerTokenFilledAmount;
}
function partialFillOrderWithTargetPermitNFT(
OrderNFT calldata order,
bytes calldata signature,
uint256 takerTokenFillAmount,
address target,
bytes calldata permitTakerAsset,
bytes calldata permitMakerAsset
)
public
returns(uint256 makerTokenFilledAmount)
{
require(takerTokenFillAmount > 0 && takerTokenFillAmount <= order.takerAmount, "Invalid Taker amount");
makerTokenFilledAmount = (takerTokenFillAmount * order.makerAmount) / order.takerAmount;
require(makerTokenFilledAmount > 0, "Maker token fill amount cannot be 0");
_permit(address(uint160(order.takerAsset)), permitTakerAsset);
_permit(address(uint160(order.makerAsset)), permitMakerAsset);
_fillOrderNFT(
order,
signature,
makerTokenFilledAmount,
takerTokenFillAmount,
target
);
return makerTokenFilledAmount;
}
function fillOrder(
Order calldata order,
bytes calldata signature
)
external
{
fillOrderWithTarget(
order,
signature,
msg.sender
);
}
function fillOrderNFT(
OrderNFT calldata order,
bytes calldata signature
)
external
{
fillOrderWithTargetNFT(
order,
signature,
msg.sender
);
}
function fillOrderWithTarget(
Order calldata order,
bytes calldata signature,
address target
)
public
{
uint256 makerTokenFillAmount = order.makerAmount;
uint256 takerTokenFillAmount = order.takerAmount;
require(takerTokenFillAmount > 0 && makerTokenFillAmount > 0, "Invalid amount");
_fillOrder(
order,
signature,
makerTokenFillAmount,
takerTokenFillAmount,
target
);
}
function fillOrderWithTargetNFT(
OrderNFT calldata order,
bytes calldata signature,
address target
)
public
{
uint256 makerTokenFillAmount = order.makerAmount;
uint256 takerTokenFillAmount = order.takerAmount;
require(takerTokenFillAmount > 0 && makerTokenFillAmount > 0, "Invalid amount");
_fillOrderNFT(
order,
signature,
makerTokenFillAmount,
takerTokenFillAmount,
target
);
}
function batchFillOrderWithTarget(
OrderInfo[] calldata orderInfos,
address target
)
public
{
for (uint256 i = 0; i < orderInfos.length; i++) {
OrderInfo calldata orderInfo = orderInfos[i];
uint256 takerTokenFillAmountOrder = orderInfo.takerTokenFillAmount;
require(takerTokenFillAmountOrder > 0 && takerTokenFillAmountOrder <= orderInfo.order.takerAmount, "Invalid Taker amount");
uint256 makerTokenFillAmountOrder = (takerTokenFillAmountOrder * orderInfo.order.makerAmount) / orderInfo.order.takerAmount;
require(makerTokenFillAmountOrder > 0, "Maker token fill amount cannot be 0");
_permit(orderInfo.order.takerAsset, orderInfo.permitTakerAsset);
_permit(orderInfo.order.makerAsset, orderInfo.permitMakerAsset);
_fillOrder(
orderInfo.order,
orderInfo.signature,
makerTokenFillAmountOrder,
takerTokenFillAmountOrder,
target
);
}
}
function tryBatchFillOrderTakerAmount(
OrderInfo[] calldata orderInfos,
uint256 takerFillAmount,
address target
)
public
{
for (uint256 i = 0; i < orderInfos.length; i++) {
OrderInfo calldata orderInfo = orderInfos[i];
uint256 takerFillAmountOrder = takerFillAmount > orderInfo.takerTokenFillAmount ? orderInfo.takerTokenFillAmount : takerFillAmount;
(bool success,) = address(this).delegatecall(
abi.encodeWithSelector(
this.partialFillOrderWithTargetPermit.selector,
orderInfo.order,
orderInfo.signature,
takerFillAmountOrder,
target,
orderInfo.permitTakerAsset,
orderInfo.permitMakerAsset
)
);
if(success)
takerFillAmount -= takerFillAmountOrder;
if (takerFillAmount == 0)
break;
}
require(takerFillAmount == 0, "Couldn't swap the requested fill amount");
}
function tryBatchFillOrderMakerAmount(
OrderInfo[] calldata orderInfos,
uint256 makerFillAmount,
address target
)
public
{
for (uint256 i = 0; i < orderInfos.length; i++) {
OrderInfo calldata orderInfo = orderInfos[i];
uint256 orderMakerAmount = orderInfo.order.makerAmount;
uint256 orderTakerAmount = orderInfo.order.takerAmount;
uint256 maxMakerFillAmount = (orderInfo.takerTokenFillAmount * orderMakerAmount) / orderTakerAmount;
uint256 makerFillAmountOrder = makerFillAmount > maxMakerFillAmount ? maxMakerFillAmount : makerFillAmount;
uint256 takerFillAmountOrder = ((makerFillAmountOrder * orderTakerAmount) + (orderMakerAmount - 1)) / orderMakerAmount;
(bool success,) = address(this).delegatecall(
abi.encodeWithSelector(
this.partialFillOrderWithTargetPermit.selector,
orderInfo.order,
orderInfo.signature,
takerFillAmountOrder,
target,
orderInfo.permitTakerAsset,
orderInfo.permitMakerAsset
)
);
if(success)
makerFillAmount -= makerFillAmountOrder;
if (makerFillAmount == 0)
break;
}
require(makerFillAmount == 0, "Couldn't swap the requested fill amount");
}
function batchFillOrderWithTargetNFT(
OrderNFTInfo[] calldata orderInfos,
address target
)
public
{
for (uint256 i = 0; i < orderInfos.length; i++) {
OrderNFTInfo calldata orderInfo = orderInfos[i];
uint256 takerTokenFillAmountOrder = orderInfo.takerTokenFillAmount;
require(takerTokenFillAmountOrder > 0 && takerTokenFillAmountOrder <= orderInfo.order.takerAmount, "Invalid Taker amount");
uint256 makerTokenFillAmountOrder = (takerTokenFillAmountOrder * orderInfo.order.makerAmount) / orderInfo.order.takerAmount;
require(makerTokenFillAmountOrder > 0, "Maker token fill amount cannot be 0");
_permit(address(uint160(orderInfo.order.takerAsset)), orderInfo.permitTakerAsset);
_permit(address(uint160(orderInfo.order.makerAsset)), orderInfo.permitMakerAsset);
_fillOrderNFT(
orderInfo.order,
orderInfo.signature,
makerTokenFillAmountOrder,
takerTokenFillAmountOrder,
target
);
}
}
function _fillOrder(
Order calldata order,
bytes calldata signature,
uint256 makerTokenFillAmount,
uint256 takerTokenFillAmount,
address target
)
private
{
address maker = order.maker;
bytes32 orderHash = _hashTypedDataV4(keccak256(abi.encode(RFQ_LIMIT_ORDER_TYPEHASH, order)));
_checkOrder(maker, order.taker, orderHash, order.makerAmount, makerTokenFillAmount, order.expiry, signature);
transferTokens(order.makerAsset, maker, target, makerTokenFillAmount);
transferTokens(order.takerAsset, msg.sender, maker, takerTokenFillAmount);
emit OrderFilled(
orderHash,
maker,
order.makerAsset,
makerTokenFillAmount,
target,
order.takerAsset,
takerTokenFillAmount
);
}
function _fillOrderNFT(
OrderNFT calldata order,
bytes calldata signature,
uint256 makerTokenFillAmount,
uint256 takerTokenFillAmount,
address target
)
private
{
address maker = order.maker;
bytes32 orderHash = _hashTypedDataV4(keccak256(abi.encode(RFQ_LIMIT_NFT_ORDER_TYPEHASH, order)));
_checkOrder(maker, order.taker, orderHash, order.makerAmount, makerTokenFillAmount, order.expiry, signature);
transferTokensNFT(order.makerAsset, maker, target, makerTokenFillAmount, order.makerAssetId);
transferTokensNFT(order.takerAsset, msg.sender, maker, takerTokenFillAmount, order.takerAssetId);
emit OrderFilledNFT(
orderHash,
maker,
order.makerAsset,
order.makerAssetId,
makerTokenFillAmount,
target,
order.takerAsset,
order.takerAssetId,
takerTokenFillAmount
);
}
function _checkOrder(
address maker,
address taker,
bytes32 orderHash,
uint256 orderAmount,
uint256 fillRequest,
uint128 expiry,
bytes calldata signature
)
internal
{
require(expiry == 0 || block.timestamp <= expiry, "Order expired");
require(taker == address(0) || taker == msg.sender, "Access denied");
mapping (bytes32 => uint256) storage remainingMaker = remaining[maker];
uint256 remainingAmount = remainingMaker[orderHash];
if(remainingAmount == UNFILLED_ORDER) {
require(SignatureChecker.isValidSignatureNow(maker, orderHash, signature), "Invalid Signature");
remainingMaker[orderHash] = (orderAmount - fillRequest) + 1;
} else {
require(remainingAmount > fillRequest, "Order already filled or expired");
remainingMaker[orderHash] = remainingAmount - fillRequest;
}
}
function _cancelOrder(
address maker,
bytes32 orderHash
)
internal
returns (bool)
{
mapping (bytes32 => uint256) storage remainingMaker = remaining[maker];
if(remainingMaker[orderHash] == FILLED_ORDER) {
return false;
}
remainingMaker[orderHash] = FILLED_ORDER;
return true;
}
function transferTokens(
address token,
address from,
address to,
uint256 amount
)
private
{
IERC20(token).safeTransferFrom(
from, to, amount
);
}
function transferTokensNFT(
uint256 token,
address from,
address to,
uint256 amount,
uint256 id
)
private
{
uint256 tokenType = token >> 160;
if (tokenType == 0) {
IERC20(address(uint160(token))).safeTransferFrom(
from, to, amount
);
} else if (tokenType == 1) {
IERC1155(address(uint160(token))).safeTransferFrom(
from, to, id, amount, bytes("")
);
} else if (tokenType == 2) {
require(amount == 1, "Invalid amount for ERC721 transfer");
IERC721(address(uint160(token))).safeTransferFrom(
from, to, id
);
} else {
revert("Invalid token type");
}
}
function _permit(address token, bytes memory permit) internal {
if (permit.length == 32 * 7) {
(bool success, ) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit));
require(success, "Permit failed");
}
if (permit.length == 32 * 8) {
(bool success, ) = token.call(abi.encodePacked(IERC20PermitLegacy.permit.selector, permit));
require(success, "Permit failed");
}
}
}
文件 3 的 13:ECDSA.sol
pragma solidity ^0.8.0;
import "../Strings.sol";
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return;
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRecover(hash, v, r, s);
}
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}
文件 4 的 13:IERC1155.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC1155 is IERC165 {
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id) external view returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}
文件 5 的 13:IERC1271.sol
pragma solidity ^0.8.0;
interface IERC1271 {
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}
文件 6 的 13:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 7 的 13:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 8 的 13:IERC20Permit.sol
pragma solidity 0.8.10;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
}
interface IERC20PermitLegacy {
function permit(
address holder,
address spender,
uint256 nonce,
uint256 expiry,
bool allowed,
uint8 v,
bytes32 r,
bytes32 s
) external;
}
文件 9 的 13:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 10 的 13:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 11 的 13:SignatureChecker.sol
pragma solidity ^0.8.0;
import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";
library SignatureChecker {
function isValidSignatureNow(
address signer,
bytes32 hash,
bytes memory signature
) internal view returns (bool) {
(address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
if (error == ECDSA.RecoverError.NoError && recovered == signer) {
return true;
}
(bool success, bytes memory result) = signer.staticcall(
abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
);
return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector);
}
}
文件 12 的 13:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
文件 13 的 13:draft-EIP712.sol
pragma solidity ^0.8.0;
import "./ECDSA.sol";
abstract contract EIP712 {
bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
uint256 private immutable _CACHED_CHAIN_ID;
address private immutable _CACHED_THIS;
bytes32 private immutable _HASHED_NAME;
bytes32 private immutable _HASHED_VERSION;
bytes32 private immutable _TYPE_HASH;
constructor(string memory name, string memory version) {
bytes32 hashedName = keccak256(bytes(name));
bytes32 hashedVersion = keccak256(bytes(version));
bytes32 typeHash = keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
);
_HASHED_NAME = hashedName;
_HASHED_VERSION = hashedVersion;
_CACHED_CHAIN_ID = block.chainid;
_CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
_CACHED_THIS = address(this);
_TYPE_HASH = typeHash;
}
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
} else {
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
}
}
function _buildDomainSeparator(
bytes32 typeHash,
bytes32 nameHash,
bytes32 versionHash
) private view returns (bytes32) {
return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
}
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
}
}
{
"compilationTarget": {
"contracts/AugustusRFQ.sol": "AugustusRFQ"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 1000000
},
"remappings": []
}
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"maker","type":"address"}],"name":"OrderCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"makerAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"makerAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"address","name":"takerAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"takerAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"uint256","name":"makerAsset","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"makerAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"takerAsset","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"takerAmount","type":"uint256"}],"name":"OrderFilledNFT","type":"event"},{"inputs":[],"name":"FILLED_ORDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RFQ_LIMIT_NFT_ORDER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RFQ_LIMIT_ORDER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNFILLED_ORDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"internalType":"struct AugustusRFQ.OrderInfo[]","name":"orderInfos","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"}],"name":"batchFillOrderWithTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"internalType":"struct AugustusRFQ.OrderNFTInfo[]","name":"orderInfos","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"}],"name":"batchFillOrderWithTargetNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderHash","type":"bytes32"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"orderHashes","type":"bytes32[]"}],"name":"cancelOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"fillOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"fillOrderNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"target","type":"address"}],"name":"fillOrderWithTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"target","type":"address"}],"name":"fillOrderWithTargetNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"},{"internalType":"bytes32[]","name":"orderHashes","type":"bytes32[]"}],"name":"getRemainingOrderBalance","outputs":[{"internalType":"uint256[]","name":"remainingBalances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"}],"name":"partialFillOrder","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"}],"name":"partialFillOrderNFT","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"partialFillOrderWithTarget","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"partialFillOrderWithTargetNFT","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"name":"partialFillOrderWithTargetPermit","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"uint256","name":"makerAsset","type":"uint256"},{"internalType":"uint256","name":"makerAssetId","type":"uint256"},{"internalType":"uint256","name":"takerAsset","type":"uint256"},{"internalType":"uint256","name":"takerAssetId","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.OrderNFT","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"name":"partialFillOrderWithTargetPermitNFT","outputs":[{"internalType":"uint256","name":"makerTokenFilledAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"remaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"internalType":"struct AugustusRFQ.OrderInfo[]","name":"orderInfos","type":"tuple[]"},{"internalType":"uint256","name":"makerFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"tryBatchFillOrderMakerAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"nonceAndMeta","type":"uint256"},{"internalType":"uint128","name":"expiry","type":"uint128"},{"internalType":"address","name":"makerAsset","type":"address"},{"internalType":"address","name":"takerAsset","type":"address"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"makerAmount","type":"uint256"},{"internalType":"uint256","name":"takerAmount","type":"uint256"}],"internalType":"struct AugustusRFQ.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"takerTokenFillAmount","type":"uint256"},{"internalType":"bytes","name":"permitTakerAsset","type":"bytes"},{"internalType":"bytes","name":"permitMakerAsset","type":"bytes"}],"internalType":"struct AugustusRFQ.OrderInfo[]","name":"orderInfos","type":"tuple[]"},{"internalType":"uint256","name":"takerFillAmount","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"tryBatchFillOrderTakerAmount","outputs":[],"stateMutability":"nonpayable","type":"function"}]