Let's say I have the following decoded transaction input data:
[
"0xac709fcb44a43c35f0da4e3163b117a17f3770f5",
"2500000000000000000000",
"0x0000000000000000000000000000000000000000",
"13775000000000000000",
"3156959",
"3696351802",
"0xd8eeda4ee2657bb267bc35c1d60babdc5aedd269",
"28",
"b4bf0dcd37ca73bd5abce9532b033dcc6427be160683de113efca41320c27f3e",
"78799d84040e5c245828b1b531ef97e1af124946f4dc1db5a20cf28a7073b269",
"726181804936299500000"
]
that's used in trade
method of this smart contract.
In this invoke the sender is willing to buy ETH
by selling ARC
(0xac709fcb44a43c35f0da4e3163b117a17f3770f5).
According to trade
arguments and transaction's input
data my calculations are:
let priceOfTokenInEther = 13775000000000000000 / 2500000000000000000000; // 0.00551
let eth = priceOfTokenInEther * 726181804936299500000 / 1000000000000000000; // 4.0012617451990105
So my result is 4.0012617451990105 ETH
was bought by trading ACR
token.
Is it correct?