TradeData constructor
const
TradeData({})
Constructs a TradeData instance with detailed information about a trade.
Includes the blockchain chainId
where the trade will occur, the estimatedPriceImpact
which indicates the potential change in price due to the trade, to
the recipient address,
data
the payload data of the trade transaction, value
the amount of native blockchain
currency (if any) to be sent with the transaction. It also requires the addresses of the
buy and sell tokens, the amounts to be bought and sold, and the allowanceTarget
,
which is the address authorized to spend the tokens.
Implementation
const factory TradeData({
required int chainId,
required String estimatedPriceImpact,
required String to,
required String data,
required String value,
required String buyTokenAddress,
required String sellTokenAddress,
required String buyAmount,
required String sellAmount,
required String allowanceTarget,
}) = _TradeData;