chore(contract): sync ocp protos to 8220291 - #6
Merged
Merged
Conversation
Replaces the Balance service's single RPC. GetBalance is gone; GetBalances takes a repeated owners list (1-1024) plus an optional mints filter, and returns balances_by_owner keyed by owner address, each entry carrying a core_mint_value total and its own balances_by_mint breakdown. GetBalancesResponse.Result drops NOT_FOUND. OK and DENIED keep their numbers, so nothing renumbers, but an owner with no balances is now absent from the map rather than signalled by a result code.
This was referenced Sep 14, 2026
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.
Syncs to
ocp-protobuf-api@82202912, three commits on from theea6418c5this was pinned at:07d584b0GetBalance can now filter by mint and provide per-mint balances (#64)62b4738eGet balances rpc (#65)82202912Remove GetBalance RPC in favour of GetBalances (#66)Intended release: 0.4.0. Breaking, so the minor bump carries it pre-1.0. The
CHANGELOG.mdentry is in this PR, sincepublish.ymlreads the section matching the version it publishes and refuses a version with none.What changed
One proto file,
proto/balance/v1/ocp_balance_service.proto. TheBalanceservice had exactly one RPC and it is replaced outright, with no deprecation window.GetBalanceGetBalancesownerrepeated owners(1-1024) plus optionalrepeated mintsfilteruint64 core_mint_valuemap<string, OwnerBalance> balances_by_ownerOwnerBalancecarries thecore_mint_valuetotal the old response returned directly, plusmap<string, MintBalance> balances_by_mintfor the per-mint breakdown. The scalar total still exists, one level further down.GetBalancesRequestcarries no auth or signature field, same asGetBalanceRequestbefore it. It reads balances for arbitrary owner accounts rather than the caller's own, so there is nothing to sign.The enum removal
GetBalancesResponse.ResultdropsNOT_FOUND.OKandDENIEDkeep0and1, so no surviving case renumbers and no positionalrawValuemapping shifts underneath a consumer. This is a case removal, not a renumbering.What does change is that "this owner has no balance" no longer has a result code. An owner with nothing to report is simply absent from
balances_by_owner, so code that branched onNOT_FOUNDhas to branch on a missing map entry instead, and code that treated any non-OKresult as a hard failure will now seeOKwhere it used to seeNOT_FOUND.Consumers
Both app PRs are open and build against this checkout through the local override. They are drafts because they pin
0.4.0, which does not exist until this merges andpublish.ymlruns:scripts/toolchain.envis untouched, andSources/moved only whereproto/did.