TradeData class

Represents the data associated with a trade on a blockchain.

This class encapsulates all necessary details needed to execute a trade, including the blockchain chain ID, the impact of the trade on the price, the addresses involved, and the amounts to be bought or sold.

Annotations
  • @freezed

Constructors

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})
Constructs a TradeData instance with detailed information about a trade.
const
factory
TradeData.fromJson(Map<String, Object?> json)
Creates a new TradeData instance from the provided JSON map.
factory

Properties

allowanceTarget String
no setterinherited
buyAmount String
no setterinherited
buyTokenAddress String
no setterinherited
chainId int
no setterinherited
copyWith → $TradeDataCopyWith<TradeData>
no setterinherited
data String
no setterinherited
estimatedPriceImpact String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sellAmount String
no setterinherited
sellTokenAddress String
no setterinherited
to String
no setterinherited
value String
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited