feat: add contract decoding submissions API - #31
Merged
Merged
Conversation
SubmitContracts wraps POST /v1/contracts/decode and ListContractSubmissions wraps GET /v1/contracts/submissions, so contracts can be submitted for decoding in batches and their status tracked, mirroring the Contract Decoding section of the API docs.
bh2smith
requested review from
ivpusic and
norbertdurcansk
and removed request for
ivpusic
September 10, 2026 17:55
TheEdgeOfRage
approved these changes
Sep 10, 2026
TheEdgeOfRage
left a comment
Member
There was a problem hiding this comment.
Approved. One documentation suggestion left inline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds
SubmitContractsandListContractSubmissionstoDuneClient, wrapping the newPOST /v1/contracts/decodeandGET /v1/contracts/submissionsendpoints (docs: https://docs.dune.com/api-reference/contracts/introduction). Lets users submit contracts for decoding in batches of up to 100 with per-item results and idempotency keys, and poll status with cursor paging.Architecture
models/contracts.go- request and response types.ABIis ajson.RawMessagesince the API accepts an array or a JSON string; optional request fields are pointers withomitempty;ListContractSubmissionsOptions.ToURLValues()encodes only the set filters.dune/contracts.go- the two methods, following the datasets/uploads pattern; interface entries and URL templates indune/dune.go.cmd/is a single-purpose query runner without subcommands, and the other endpoint families (datasets, uploads, matviews) are library-only too, so I kept parity with them rather than redesigning the CLI.go vetand-racetests pass.make lintcannot build golangci-lint 1.57.2 under my local Go 1.27, so CI is the authority for lint.Fixes DF-1107