Expand description
Generated by the following Solidity interface…
interface CowswapGPv2Settlement {
struct Data {
uint256 sellTokenIndex;
uint256 buyTokenIndex;
address receiver;
uint256 sellAmount;
uint256 buyAmount;
uint32 validTo;
bytes32 appData;
uint256 feeAmount;
uint256 flags;
uint256 executedAmount;
bytes signature;
}
event Interaction(address indexed target, uint256 value, bytes4 selector);
event OrderInvalidated(address indexed owner, bytes orderUid);
event PreSignature(address indexed owner, bytes orderUid, bool signed);
event Settlement(address indexed solver);
event Trade(address indexed owner, address sellToken, address buyToken, uint256 sellAmount, uint256 buyAmount, uint256 feeAmount, bytes orderUid);
constructor(address authenticator_, address vault_);
receive() external payable;
function authenticator() external view returns (address);
function domainSeparator() external view returns (bytes32);
function filledAmount(bytes memory) external view returns (uint256);
function freeFilledAmountStorage(bytes[] memory orderUids) external;
function freePreSignatureStorage(bytes[] memory orderUids) external;
function getStorageAt(uint256 offset, uint256 length) external view returns (bytes memory);
function invalidateOrder(bytes memory orderUid) external;
function preSignature(bytes memory) external view returns (uint256);
function setPreSignature(bytes memory orderUid, bool signed) external;
function settle(address[] memory tokens, uint256[] memory clearingPrices, Data[] memory trades, (address, uint256, bytes)[][3] memory interactions) external;
function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response);
function simulateDelegatecallInternal(address targetContract, bytes memory calldataPayload) external returns (bytes memory response);
function swap((bytes32, uint256, uint256, uint256, bytes)[] memory swaps, address[] memory tokens, Data memory trade) external;
function vault() external view returns (address);
function vaultRelayer() external view returns (address);
}
…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "authenticator_",
"type": "address",
"internalType": "contract GPv2Authentication"
},
{
"name": "vault_",
"type": "address",
"internalType": "contract IVault"
}
],
"stateMutability": "nonpayable"
},
{
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "authenticator",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract GPv2Authentication"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "domainSeparator",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "filledAmount",
"inputs": [
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "freeFilledAmountStorage",
"inputs": [
{
"name": "orderUids",
"type": "bytes[]",
"internalType": "bytes[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "freePreSignatureStorage",
"inputs": [
{
"name": "orderUids",
"type": "bytes[]",
"internalType": "bytes[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getStorageAt",
"inputs": [
{
"name": "offset",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "length",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "invalidateOrder",
"inputs": [
{
"name": "orderUid",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "preSignature",
"inputs": [
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "setPreSignature",
"inputs": [
{
"name": "orderUid",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "signed",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "settle",
"inputs": [
{
"name": "tokens",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "clearingPrices",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "trades",
"type": "tuple[]",
"internalType": "struct GPv2Trade.Data[]",
"components": [
{
"name": "sellTokenIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "buyTokenIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "address",
"internalType": "address"
},
{
"name": "sellAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "buyAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "validTo",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "appData",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "feeAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "flags",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "executedAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
]
},
{
"name": "interactions",
"type": "tuple[][3]",
"internalType": "tuple[][3]",
"components": [
{
"name": "target",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "callData",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "simulateDelegatecall",
"inputs": [
{
"name": "targetContract",
"type": "address",
"internalType": "address"
},
{
"name": "calldataPayload",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "response",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "simulateDelegatecallInternal",
"inputs": [
{
"name": "targetContract",
"type": "address",
"internalType": "address"
},
{
"name": "calldataPayload",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "response",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "swap",
"inputs": [
{
"name": "swaps",
"type": "tuple[]",
"internalType": "tuple[]",
"components": [
{
"name": "poolId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "assetInIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "assetOutIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "userData",
"type": "bytes",
"internalType": "bytes"
}
]
},
{
"name": "tokens",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "trade",
"type": "tuple",
"internalType": "struct GPv2Trade.Data",
"components": [
{
"name": "sellTokenIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "buyTokenIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "address",
"internalType": "address"
},
{
"name": "sellAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "buyAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "validTo",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "appData",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "feeAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "flags",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "executedAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "vault",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IVault"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "vaultRelayer",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract GPv2VaultRelayer"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "Interaction",
"inputs": [
{
"name": "target",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "selector",
"type": "bytes4",
"indexed": false,
"internalType": "bytes4"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OrderInvalidated",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "orderUid",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PreSignature",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "orderUid",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
},
{
"name": "signed",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Settlement",
"inputs": [
{
"name": "solver",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Trade",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sellToken",
"type": "address",
"indexed": false,
"internalType": "contract IERC20"
},
{
"name": "buyToken",
"type": "address",
"indexed": false,
"internalType": "contract IERC20"
},
{
"name": "sellAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "buyAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "feeAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "orderUid",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
}
]
Structs§
- Event with signature
Interaction(address,uint256,bytes4)
and selector0xed99827efb37016f2275f98c4bcf71c7551c75d59e9b450f79fa32e60be672c2
. - Event with signature
OrderInvalidated(address,bytes)
and selector0x875b6cb035bbd4ac6500fabc6d1e4ca5bdc58a3e2b424ccb5c24cdbebeb009a9
. - Event with signature
PreSignature(address,bytes,bool)
and selector0x01bf7c8b0ca55deecbea89d7e58295b7ffbf685fd0d96801034ba8c6ffe1c68d
. - Event with signature
Settlement(address)
and selector0x40338ce1a7c49204f0099533b1e9a7ee0a3d261f84974ab7af36105b8c4e9db4
. - Event with signature
Trade(address,address,address,uint256,uint256,uint256,bytes)
and selector0xa07a543ab8a018198e99ca0184c93fe9050a79400a0a723441f84de1d972cc17
. - Function with signature
authenticator()
and selector0x2335c76b
. - Container type for the return parameters of the
authenticator()
function. - Constructor`.
- Function with signature
domainSeparator()
and selector0xf698da25
. - Container type for the return parameters of the
domainSeparator()
function. - Function with signature
filledAmount(bytes)
and selector0x2479fb6e
. - Container type for the return parameters of the
filledAmount(bytes)
function. - Function with signature
freeFilledAmountStorage(bytes[])
and selector0xed9f35ce
. - Container type for the return parameters of the
freeFilledAmountStorage(bytes[])
function. - Function with signature
freePreSignatureStorage(bytes[])
and selector0xa2a7d51b
. - Container type for the return parameters of the
freePreSignatureStorage(bytes[])
function. - Function with signature
getStorageAt(uint256,uint256)
and selector0x5624b25b
. - Container type for the return parameters of the
getStorageAt(uint256,uint256)
function. - Function with signature
invalidateOrder(bytes)
and selector0x15337bc0
. - Container type for the return parameters of the
invalidateOrder(bytes)
function. - Function with signature
preSignature(bytes)
and selector0xd08d33d1
. - Container type for the return parameters of the
preSignature(bytes)
function. - Function with signature
setPreSignature(bytes,bool)
and selector0xec6cb13f
. - Container type for the return parameters of the
setPreSignature(bytes,bool)
function. - Function with signature
settle(address[],uint256[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256,bytes)[][3])
and selector0x13d79a0b
. - Container type for the return parameters of the
settle(address[],uint256[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256,bytes)[][3])
function. - Function with signature
simulateDelegatecall(address,bytes)
and selector0xf84436bd
. - Function with signature
simulateDelegatecallInternal(address,bytes)
and selector0x43218e19
. - Container type for the return parameters of the
simulateDelegatecallInternal(address,bytes)
function. - Container type for the return parameters of the
simulateDelegatecall(address,bytes)
function. - Function with signature
swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes))
and selector0x845a101f
. - Container type for the return parameters of the
swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes))
function. - Function with signature
vault()
and selector0xfbfa77cf
. - Function with signature
vaultRelayer()
and selector0x9b552cc2
. - Container type for the return parameters of the
vaultRelayer()
function. - Container type for the return parameters of the
vault()
function.
Enums§
- Container for all the
CowswapGPv2Settlement
function calls. - Container for all the
CowswapGPv2Settlement
events.