Skip to content

Commit

Permalink
stellar#76: retain cost object on simulation response
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed May 11, 2023
1 parent ec786ab commit 875717a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/soroban_rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export namespace SorobanRpc {
smart: string;
}

export interface Cost {
cpuInsns: string;
memBytes: string;
}

export interface GetHealthResponse {
status: "healthy";
}
Expand Down Expand Up @@ -124,5 +129,6 @@ export namespace SorobanRpc {
suggestedInclusionFee: string;
results: SimulateHostFunctionResult[];
latestLedger: number;
cost: Cost;
}
}
4 changes: 4 additions & 0 deletions test/unit/server/simulate_transaction_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ describe("Server#simulateTransaction", function() {
},
],
latestLedger: 3,
cost: {
cpuInsns: "0",
memBytes: "0",
},
};

beforeEach(function() {
Expand Down
4 changes: 4 additions & 0 deletions test/unit/transaction_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ describe("assembleTransaction", () => {
},
],
latestLedger: 3,
cost: {
cpuInsns: "0",
memBytes: "0",
},
};
describe("Transaction", () => {
const networkPassphrase = SorobanClient.Networks.TESTNET;
Expand Down

0 comments on commit 875717a

Please sign in to comment.