Skip to content

Commit

Permalink
Rename field
Browse files Browse the repository at this point in the history
  • Loading branch information
thpani committed Sep 30, 2024
1 parent 5ffeb57 commit 063548a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions solarkraft/src/fetcher/callDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export async function extractContractCall(
// `created_at` and `env.ledger().timestamp()` have seconds-precision. We divide by 1000 here since `Date` internally
// represents the timestamp as milliseconds.
const timestamp = new Date(op.created_at).getTime() / 1000
const transaction_successful = op.transaction_successful
const txHash = op.transaction_hash
// decode the call parameters from XDR to native JS values
const params = op.parameters.map((p) => {
Expand Down Expand Up @@ -122,7 +121,7 @@ export async function extractContractCall(
height,
timestamp,
txHash,
transaction_successful,
txSuccess: op.transaction_successful,
contractId,
method,
methodArgs,
Expand Down
2 changes: 1 addition & 1 deletion solarkraft/src/fetcher/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface ContractCallEntry {
/**
* Whether the transaction was successful or failed.
*/
transaction_successful: boolean
txSuccess: boolean
/**
* The address of the contract being called.
*/
Expand Down
2 changes: 1 addition & 1 deletion solarkraft/test/e2e/list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('list', () => {
timestamp: 1716393856,
height: 1000,
txHash: TX_HASH,
transaction_successful: true,
txSuccess: true,
contractId: CONTRACT_ID,
method: 'set_i32',
methodArgs: [42],
Expand Down
4 changes: 2 additions & 2 deletions solarkraft/test/integration/callDecoder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ describe('call decoder from Horizon', function () {
const successfulEntry = await extractEntry(successfulTxs[0])
const failedEntry = await extractEntry(failedTxs[0])

assert.isTrue(successfulEntry.transaction_successful)
assert.isFalse(failedEntry.transaction_successful)
assert.isTrue(successfulEntry.txSuccess)
assert.isFalse(failedEntry.txSuccess)
})
})
10 changes: 5 additions & 5 deletions solarkraft/test/unit/instrument.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('Apalache JSON instrumentor', () => {
timestamp: 1716393856,
height: 100,
txHash: '0xasdf',
transaction_successful: true,
txSuccess: true,
contractId: '0xqwer',
returnValue: null,
method: 'Claim',
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('Apalache JSON instrumentor', () => {
timestamp: 1716393856,
height: 100,
txHash: '0xasdf',
transaction_successful: true,
txSuccess: true,
contractId: '0xqwer',
returnValue: null,
method: 'Claim',
Expand Down Expand Up @@ -239,7 +239,7 @@ describe('Apalache JSON instrumentor', () => {
timestamp: 1716393856,
height: 100,
txHash: '0xasdf',
transaction_successful: true,
txSuccess: true,
contractId: '0xqwer',
returnValue: null,
method: 'Claim',
Expand Down Expand Up @@ -291,7 +291,7 @@ describe('Apalache JSON instrumentor', () => {
timestamp: 1716393856,
height: 100,
txHash: '0xasdf',
transaction_successful: true,
txSuccess: true,
contractId: '0xqwer',
returnValue: null,
method: 'Claim',
Expand Down Expand Up @@ -339,7 +339,7 @@ describe('Apalache JSON instrumentor', () => {
timestamp: 1716393856,
height: 100,
txHash: '0xasdf',
transaction_successful: true,
txSuccess: true,
contractId: '0xqwer',
returnValue: null,
method: 'foo',
Expand Down
2 changes: 1 addition & 1 deletion solarkraft/test/unit/storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('storage tests', () => {
timestamp: 1716393856,
height: 1000,
txHash: TX_HASH,
transaction_successful: true,
txSuccess: true,
contractId: CONTRACT_ID,
method: 'set_i32',
methodArgs: [42],
Expand Down

0 comments on commit 063548a

Please sign in to comment.