Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Kupo #256

Merged
merged 1 commit into from
Oct 13, 2024
Merged

feat: add support for Kupo #256

merged 1 commit into from
Oct 13, 2024

Conversation

verbotenj
Copy link
Contributor

@verbotenj verbotenj commented Oct 3, 2024

It requires gouroboros v0.99.0; otherwise, it won't marshal assets to Json correctly.

resolvedInputs is a new field

Network: preprod

{"timestamp":"2024-10-11T20:05:21-04:00","level":"INFO","msg":"","component":"main","plugin":"output.log","type":"event","event":{"type":"chainsync.transaction","timestamp":"2024-10-11T20:05:21.451504-04:00","context":{"blockNumber":2776776,"slotNumber":73008321,"transactionHash":"5f91ebbbbb3f022f02a31061a3b9edcd3841c51b383a07044f071a0ea60f5e4d","transactionIdx":6,"networkMagic":1},"payload":{"blockHash":"bdee0675834128343538531074c3e0e66483f0bd392389a3296cf749c8487a6b","inputs":["1349a62a9394ea6c40c79683fc72799cf87ef91f853162813f885f71d0d2dbb0#3","7d5ba310180286e78f119f0862ec0a24aa30a5b438d9882d5df915fbc44c9920#0"],"outputs":[{"address":"addr_test1wzc86g4ym366hkaphryqqvaptwznqkmk2gdqz9930u534pcx58ahw","amount":2000000,"assets":[{"name":"NodeFeed","nameHex":"4e6f646546656564","policyId":"362e3f869c98ce971ead0e2705c56df467ddd2aecb44f6f216c3e1d5","fingerprint":"asset1rt8vrlfmceq8w6ljnj3kxh8536h9mepdu2tw5k","amount":1}],"datum":{"cbor":"d87a9fd8799f581cbd95d582888acda57a20256bb03e4c4abb6bdf09a47d788605412c53d8799fd8799f19075a1b000001927e0b0a27ffffffff","json":{"constructor":1,"fields":[{"constructor":0,"fields":[{"bytes":"bd95d582888acda57a20256bb03e4c4abb6bdf09a47d788605412c53"},{"constructor":0,"fields":[{"constructor":0,"fields":[{"int":1882},{"int":1728691505703}]}]}]}]}}},{"address":"addr_test1vz7et4vz3z9vmft6yqjkhvp7f39tk67lpxj867yxq4qjc5c378xa3","amount":9000000},{"address":"addr_test1vz7et4vz3z9vmft6yqjkhvp7f39tk67lpxj867yxq4qjc5c378xa3","amount":7115590}],"referenceInputs":["180fb7cfedba19697b4d164867c49ad8bf2493f6dd51d860aa03cd3e46301cb6#0"],"fee":488175,"ttl":73008345,"resolvedInputs":[{"address":"addr_test1vz7et4vz3z9vmft6yqjkhvp7f39tk67lpxj867yxq4qjc5c378xa3","amount":16603765,"assets":[]},{"address":"addr_test1wzc86g4ym366hkaphryqqvaptwznqkmk2gdqz9930u534pcx58ahw","amount":2000000,"assets":[{"name":"4e6f646546656564","nameHex":"34653666363436353436363536353634","policyId":"362e3f869c98ce971ead0e2705c56df467ddd2aecb44f6f216c3e1d5","fingerprint":"asset1xv9k8k9xlpsmm4m7cyrexq2wkgmmqycgyaau4r","amount":1}]}]}}}

@verbotenj verbotenj force-pushed the feat/support-input-lookups branch 8 times, most recently from 1918b14 to 4f0f6a5 Compare October 12, 2024 00:37
@verbotenj verbotenj marked this pull request as ready for review October 12, 2024 00:42
@verbotenj verbotenj requested a review from a team as a code owner October 12, 2024 00:42
input/chainsync/chainsync.go Show resolved Hide resolved
Inputs: tx.Inputs(),
Outputs: tx.Outputs(),
Fee: tx.Fee(),
ResolvedInputs: resolvedInputs,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to the payload only if len > 0, so we're not shipping empty keys.

Signed-off-by: Ales Verbic <verbotenj@blinklabs.io>
@verbotenj verbotenj force-pushed the feat/support-input-lookups branch from 4f0f6a5 to 2c17610 Compare October 13, 2024 20:52
@verbotenj verbotenj merged commit ae7cacf into main Oct 13, 2024
9 checks passed
@verbotenj verbotenj deleted the feat/support-input-lookups branch October 13, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants