What's Changed
New endpoint: /preview
- Adds new endpoint under
POST /v1/chains/<chain_id>/transactions/<safe_address>/preview
#924 - This endpoint is behind a feature flag – to enable it, set
FEATURE_PREVIEW_ENDPOINT
totrue
in your environment to enable it - This endpoint takes some transaction data and returns a
TransactionInfo
(used for rendering the transaction "header") and the respectiveTransactionData
. - The clients should provide in the body of the request the following parameters:
to
(mandatory),data
(optional),value
(mandatory) andoperation
(mandatory) - If there's an error while trying to get the decoded data, then the original raw data is returned – ie.: this endpoint does not fail if there's an issue while decoding the data or if it's
null
- If the
to
address has no mapping (to a known address) then the originalto
address is returned with the other "known address" fields set tonull
POST /v1/chains/<chain_id>/transactions/<safe_address>/preview
client >>> service
{
"to": <str>,
"data": <optional-str>,
"value": <str>,
"operation": <int>
}
client <<< service
{
"txInfo": TransactionInfo,
"txData": TransactionData
}
Other changes
- Bump serde from 1.0.140 to 1.0.141 in #935
Full Changelog: v3.29.0...v3.30.0