Skip to content

Commit 42c4fde

Browse files
committed
fix(iota-graphql): update schema with gas_cost_burned field
1 parent afe08dc commit 42c4fde

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

crates/iota-graphql-rpc/schema.graphql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,10 @@ type GasCostSummary {
13851385
"""
13861386
computationCost: BigInt
13871387
"""
1388+
Gas burned for executing this transactions (in NANOS).
1389+
"""
1390+
computationCostBurned: BigInt
1391+
"""
13881392
Gas paid for the data stored on-chain by this transaction (in NANOS).
13891393
"""
13901394
storageCost: BigInt

crates/iota-graphql-rpc/src/types/gas.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ impl GasCostSummary {
111111
Some(BigInt::from(self.computation_cost))
112112
}
113113

114+
/// Gas burned for executing this transactions (in NANOS).
115+
async fn computation_cost_burned(&self) -> Option<BigInt> {
116+
Some(BigInt::from(self.computation_cost_burned))
117+
}
118+
114119
/// Gas paid for the data stored on-chain by this transaction (in NANOS).
115120
async fn storage_cost(&self) -> Option<BigInt> {
116121
Some(BigInt::from(self.storage_cost))

crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,10 @@ type GasCostSummary {
13891389
"""
13901390
computationCost: BigInt
13911391
"""
1392+
Gas burned for executing this transactions (in NANOS).
1393+
"""
1394+
computationCostBurned: BigInt
1395+
"""
13921396
Gas paid for the data stored on-chain by this transaction (in NANOS).
13931397
"""
13941398
storageCost: BigInt

0 commit comments

Comments
 (0)