Question about ConstructionPreprocessRequest

If caller sets max_fee and suggested_fee_multiplier in ConstructionPreprocessRequest , then we need to put max_fee and suggested_fee_multiplier in ConstructionPreprocessResponse options and pass to /construction/metadata ?

Sorry for the delay on a response here @kingstone!

Because the caller will not be creating the request to /construction/metadata from scratch or modifying the request returned by /construction/preprocess, you are correct in concluding that you will need to pass max_fee and suggested_fee_multiplier to /construction/metadata by including them in the ConstructionPreprocessResponse.

While this may seem unusual (i.e. why not just have the caller populate these as an argument to /construction/metadata) , we felt that only having one method where the caller could specify construction options simplified the flow and made automated testing easier. I’ve attached a snippet of code where we extract the populated PreprocessMetadata from the automated Construction API output (more docs coming on how to navigate this tool soon!):

Let me know if you have any additional questions!

1 Like