Skip to content

Commit

Permalink
An 4800/tensorswap refactor (#553)
Browse files Browse the repository at this point in the history
* (wip) initial model

* remove testing lines, add depends on comment

* handle more than  one sale per tx

* separate sol escrow from margin account

* use min_price as sale price for bid sales

* fix column name

* add model docs and tests

* add caveat for tensorswap sales amount description

* add business logic tests
  • Loading branch information
desmond-hui authored May 8, 2024
1 parent 9db5cea commit c0d866b
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 185 deletions.
19 changes: 19 additions & 0 deletions data/testing__nft_sales_tensorswap.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tx_id,index,inner_index,purchaser,seller,mint,sales_amount
zzvAhzMxDpJy99zcYms6vsjimT3XhQBf76s9AYA4XcYaEgRS2EmMDHY9uHrfz7372v85726Krz3kaKfYmLgnMFz,2,,HEsoAeQ6jgwiyPCL7A9mBjMf34qVAF96KYPNdxE68iY6,2w4HeHXEEVrpqpKUTZqVSCzCR5uWKK88pNY9pfqSW59R,BBMQUm1domLQUZr4gUm9Pd6EGLnuUu9hPX7bpD5dpqMT,0.468830396
4KnHxNCwtbvdnUP9xP6aUAGpEVVgZqVnGP8FzJAz3ghPhnSgUvm8DPVdwm5tE9d78ScBxFQNqzRotW5mr2bYL9P5,2,,2zzPrvMe843AJ15jwppiA25XRXXgM4ajH9ZnVLtPmvPb,8FQ73HFaXurdDEUC4UpTJw99hvpaCJUHiqaQwBGgujiD,AnBW1sLFStkdHXpyJAH49Gu2t4y4rRhDnEKcEAcps28W,0.852
2nrF2VHpLvYQKjtFWqTxoXtHNDEJEH2zi1xYeaDd2FprFYWY7wajcnbnQbPkhqwrhQkiKfYDgKc9mCDgWUzZwvrb,2,,CqA42zXaf5zXk7EW7jtCLfL2uH1efuB9GtTfjfJ2hzoq,BsBqiPgRgHPa8YgJ6wNgfP2GJsSgAsesXtaqqvVcGm79,Ek9ECbHYSW6QB9aUU6UsovP5d2Z7mfEBcdRrA5bt8thB,2.124395
p55mzFVcnhtVCi6sawH2pkSxkJa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6cEVtHvnzW749hjqKFdwYVYS4Bn2GHtc3qPGsk9AuowBhamqDkJaXNgiC3CaSDMK4k2a2pEchzJ,3,,FgVYBs7Qag74oSNgFozGH2zCXeWZKyff6KNyQBGVZsF2,AQYyCfb358cokJks8GBYrRhCE2smJNEFsj38V9N4y54R,AMZJ5CaFHPeL3V1poFt14GvZwisJk7x7aRN69C3DNcRD,0.666161076
5 changes: 5 additions & 0 deletions models/descriptions/_invocation_id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% docs _invocation_id %}

Unique identifier for DBT job run that inserted/modified this record

{% enddocs %}
Loading

0 comments on commit c0d866b

Please sign in to comment.