-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Summary
Submitting a limit order without an extension (hasExtension flag set to false, no extension field in JSON) results in a 400 response:
{"error":"Bad Request","message":"Invalid address 0x","statusCode":400}
I cannot identify any field still pointing to an empty/zero address that the API treats as required. It looks like the backend still tries to parse an interaction / extension structure.
var makerTraitsNoExtBI = Traits.BuildMakerTraits( allowedSender: null, expirationUnix: 1755385393UL, nonceOrEpoch: 3UL, series: 0UL, partialFillsAllowed: true, multipleFillsAllowed: true, preInteraction: false, postInteraction: false, needCheckEpochManager: false, hasExtension: false, usePermit2: false, unwrapWeth: false);
Verification of Flags Before Sending
bool hasExtension = ((makerTraitsNoExtBI >> 249) & BigInteger.One) == BigInteger.One; bool postInteraction = ((makerTraitsNoExtBI >> 251) & BigInteger.One) == BigInteger.One; bool preInteraction = ((makerTraitsNoExtBI >> 252) & BigInteger.One) == BigInteger.One; Console.WriteLine($"hasExtension={hasExtension} postInteraction={postInteraction} preInteraction={preInteraction}");
JSON Payload Sent
{ "orderHash": "0xe52e480e5d58...", "signature": "0xb778d632b...", "data": { "makerAsset": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8", "takerAsset": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "maker": "0x618...", "receiver": "0xc0dfdb9e7a392c3dbbe7c6fbe8fbc1789c9fe05e", "makingAmount": "1000000", "takingAmount": "500000000000000000", "salt": "17869197887894548966920054135963920299014857184121198371937508994779341940462", "makerTraits": "28948022309329048855892746252171976963321485972528220729556049814025540730880" } }
Response
{ "error": "Bad Request", "message": "Invalid address 0x", "statusCode": 400 }