_from
, _to
, and _sender
addresses within the transaction and determine the action with the following logic:
_from
address is a contract or an externally owned account. When it is determined that _from is a contract the action type is a Buy action. This can determine certain transfers from individuals that could be realistically assessed as a P2P Transfer action as a Buy action. Transfers from Smart Contract Accounts or Smart Contract Wallets will be determined as a buy.
Additionally, if tokens are transfered during the construction of a contract, this transfer will be determined as a P2P Transfer and not a Buy action. This is because the contract at construction has no code and would be considered an externally owned account until the contract is deployed.