root
Compose instructions and generate a quote
Compose instructions and retrieve a MEE quote in a single request.
post/v1/quote
Request body
Example request
{
"ownerAddress": "0x0a7C906832544293a6018bA25280c7f7b0Bbf120",
"authorizations": [
{
"address": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 8453,
"nonce": 38,
"r": "0x192a2503401595804c35cdc5b748fe35cceb77ef534bf5d670f7797376487ded",
"s": "0x1fd3c8acd0b7c5f64a8d72c35c39988544fca961b838277ab11750041cccc3d1",
"v": "28",
"yParity": 1
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
],
"feeToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"gasRefundAddress": "0x0a7C906832544293a6018bA25280c7f7b0Bbf120"
},
"cleanUps": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"recipientAddress": "0x0a7C906832544293a6018bA25280c7f7b0Bbf120",
"amount": "1000000",
"gasLimit": "150000"
}
],
"gasLimit": "12345678901234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"simulationOverrides": {
"tokenOverrides": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"accountAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"balance": "1000000000"
}
],
"customOverrides": [
{
"contractAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"storageSlot": "0x1234567890123456789012345678901234567890123456789012345678901234",
"chainId": 1,
"value": "0x1234567890123456789012345678901234567890"
}
]
},
"composeFlows": [
{
"type": "/instructions/build",
"data": {
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"chainId": 8453,
"value": "0",
"gasLimit": "50000",
"functionSignature": "function transfer(address to, uint256 amount)",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600
},
"batch": true
}
],
"accountAddress": {
"8453": "0x4b19129EA58431A06D01054f69AcAe5de50633b6"
}
}Response
Combined response containing composed instructions and the resulting MEE quote.
Example response
{
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"fee": {
"amount": "10000000000000000",
"token": "0x0000000000000000000000000000000000000000",
"chainId": 8453
},
"quoteType": "permit",
"quote": {
"hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
"node": "0x9876543210abcdef9876543210abcdef98765432",
"commitment": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"paymentInfo": {
"sender": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"initCode": "0x1234abcd",
"nonce": "0",
"token": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 1,
"verificationGasLimit": "21000",
"eoa": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"eip7702Auth": {
"address": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 8453,
"nonce": 38,
"r": "0x192a2503401595804c35cdc5b748fe35cceb77ef534bf5d670f7797376487ded",
"s": "0x1fd3c8acd0b7c5f64a8d72c35c39988544fca961b838277ab11750041cccc3d1",
"v": "28",
"yParity": 1
},
"callGasLimit": "50000",
"sponsored": true,
"sponsorshipUrl": "https://sponsorship.abc.org",
"tokenAmount": "1000 (1000 USDC), 1 (1 ether)",
"tokenValue": "1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)",
"tokenWeiAmount": "1000000000000000000000 (1000 ether), 250000 (0.25 USDC)",
"gasFee": "21000000000000000",
"orchestrationFee": "1000000000000000"
},
"userOps": [
{
"userOp": {
"sender": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"nonce": "0",
"initCode": "0x1234abcd",
"callData": "0x1234abcd",
"callGasLimit": "21000",
"verificationGasLimit": "100000",
"preVerificationGas": "21000",
"maxFeePerGas": "1000000000",
"maxPriorityFeePerGas": "100000000",
"paymasterAndData": "0x",
"signature": "0xabcdef123456"
},
"userOpHash": "0x1234abcd5678ef90",
"meeUserOpHash": "0xabcdef1234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"maxGasLimit": "1000000",
"maxFeePerGas": "1000000000",
"chainId": 8453,
"eip7702Auth": {
"address": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 8453,
"nonce": 38,
"r": "0x192a2503401595804c35cdc5b748fe35cceb77ef534bf5d670f7797376487ded",
"s": "0x1fd3c8acd0b7c5f64a8d72c35c39988544fca961b838277ab11750041cccc3d1",
"v": "28",
"yParity": 1
},
"shortEncoding": true
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
]
},
"payloadToSign": [
{
"signablePayload": {
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"message": {
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"value": "1000000000000000000000",
"nonce": "0",
"deadline": "1647857449"
},
"primaryType": "Permit"
},
"metadata": {
"nonce": "0",
"name": "USD Coin",
"version": "2",
"domainSeparator": "0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335",
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"amount": "1000000000000000000000"
}
}
],
"instructions": [
{
"calls": [
{
"to": "0x1111111254EEB25477B68fb85Ed929f73A960582",
"value": "0",
"functionSig": "transfer(address,uint256)",
"inputParams": [
{
"paramData": "example string",
"constraints": [
{
"referenceData": "example string"
}
]
}
],
"outputParams": [
{
"paramData": "example string"
}
],
"gasLimit": "100000"
}
],
"chainId": 1,
"isComposable": true,
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600
}
]
}