mars
mars copied to clipboard
Feat:decode opensea seaport contract log event
@GrapeBaBa Hi, Any references for this feature?
@GrapeBaBa Hi, Any references for this feature?
I need statistic volume which I think I need transfer price. It seems in another log topic which emit by seaport contract. I found this discussion https://github.com/ProjectOpenSea/seaport/discussions/546
Thanks. It's not hard. Like this tx from opensea: https://etherscan.io/tx/0xe0b9b25822b2adc8ae16d7ad8bec975a690df84d0ad9c16c9400ef3835b8146f#eventlog
The transfer price is 12 ETH
The event log protocol defined here:
https://github.com/ProjectOpenSea/seaport/blob/171f2cd7faf13b2bf0455851499f1981274977f7/contracts/lib/ConsiderationConstants.sol#L131-L140
d55d0508062d939a1097fea2fc66527ed0b130d14ebe2112f16b77c13a824e02. -- orderHash
000000000000000000000000fa90d99d10c5d94d0e67b2d0f706020b722a529a -- fulfiller
0000000000000000000000000000000000000000000000000000000000000080 -- offer offset
0000000000000000000000000000000000000000000000000000000000000120 -- consideration offset
0000000000000000000000000000000000000000000000000000000000000001 -- offer.length (1)
0000000000000000000000000000000000000000000000000000000000000002 -- offerItemType
00000000000000000000000049cf6f5d44e70224e2e23fdcdd2c053f30ada28b. -- offerToken
0000000000000000000000000000000000000000000000000000000000001903 -- offerIdentifier
0000000000000000000000000000000000000000000000000000000000000001 -- offerAmount
0000000000000000000000000000000000000000000000000000000000000003 ... ...
Yes, I can try to implement it. However I didn't think about whether to add fields to the token_transfer table or add a new order table.
Hello, how about adding a new table: opensea?