Skip to content

Commit 937b550

Browse files
authored
feat(rpc): add costUnits to transaction meta (#494)
1 parent 18f2794 commit 937b550

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

rpc/types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ type TransactionMeta struct {
272272
ReturnData ReturnData `json:"returnData"`
273273

274274
ComputeUnitsConsumed *uint64 `json:"computeUnitsConsumed"`
275+
276+
// The cost the block cost model charged this transaction against the block
277+
// limits. Nil when the RPC node does not report it.
278+
CostUnits *uint64 `json:"costUnits"`
275279
}
276280

277281
type ReturnData struct {
@@ -574,6 +578,10 @@ type ParsedTransactionMeta struct {
574578
ReturnData ReturnData `json:"returnData"`
575579

576580
ComputeUnitsConsumed *uint64 `json:"computeUnitsConsumed"`
581+
582+
// The cost the block cost model charged this transaction against the block
583+
// limits. Nil when the RPC node does not report it.
584+
CostUnits *uint64 `json:"costUnits"`
577585
}
578586

579587
type ParsedInnerInstruction struct {

0 commit comments

Comments
 (0)