diff --git a/Stellar/soroban-futurenet-starter/README.md b/Stellar/soroban-futurenet-starter/README.md index 2ebec03..ab0943f 100644 --- a/Stellar/soroban-futurenet-starter/README.md +++ b/Stellar/soroban-futurenet-starter/README.md @@ -30,7 +30,7 @@ The simplest way to run your project is by running `yarn dev` or `npm run-script 1. `yarn codegen` - Generates types from the GraphQL schema definition and contract ABIs and saves them in the `/src/types` directory. This must be done after each change to the `schema.graphql` file or the contract ABIs 2. `yarn build` - Builds and packages the SubQuery project into the `/dist` directory -3. `docker-compose pull && docker-compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` +3. `docker compose pull && docker compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` You can observe the three services start, and once all are running (it may take a few minutes on your first start), please open your browser and head to [http://localhost:3000](http://localhost:3000) - you should see a GraphQL playground showing with the schemas ready to query. [Read the docs for more information](https://academy.subquery.network/run_publish/run.html) or [explore the possible service configuration for running SubQuery](https://academy.subquery.network/run_publish/references.html). diff --git a/Stellar/soroban-futurenet-starter/package.json b/Stellar/soroban-futurenet-starter/package.json index 13b541f..5e6c8ad 100644 --- a/Stellar/soroban-futurenet-starter/package.json +++ b/Stellar/soroban-futurenet-starter/package.json @@ -6,8 +6,8 @@ "scripts": { "build": "subql build", "codegen": "subql codegen", - "start:docker": "docker-compose pull && docker-compose up --remove-orphans", - "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", + "start:docker": "docker compose pull && docker compose up --remove-orphans", + "dev": "subql codegen && subql build && docker compose pull && docker compose up --remove-orphans", "prepack": "rm -rf dist && npm run build", "test": "subql build && subql-node-stellar test" }, @@ -26,8 +26,8 @@ }, "devDependencies": { "@subql/cli": "latest", - "@subql/types": "latest", "@subql/testing": "latest", - "typescript": "latest" + "@subql/types": "latest", + "typescript": "^5.2.2" } } diff --git a/Stellar/soroban-futurenet-starter/project.ts b/Stellar/soroban-futurenet-starter/project.ts index 3ff275c..034362f 100644 --- a/Stellar/soroban-futurenet-starter/project.ts +++ b/Stellar/soroban-futurenet-starter/project.ts @@ -3,7 +3,7 @@ import { StellarHandlerKind, StellarProject, } from "@subql/types-stellar"; -import { Horizon } from "stellar-sdk"; +import { Horizon } from "@stellar/stellar-sdk"; const project: StellarProject = { specVersion: "1.0.0", name: "soroban-futurenet-starter", diff --git a/Stellar/soroban-futurenet-starter/src/mappings/mappingHandlers.ts b/Stellar/soroban-futurenet-starter/src/mappings/mappingHandlers.ts index 638a289..93c459d 100644 --- a/Stellar/soroban-futurenet-starter/src/mappings/mappingHandlers.ts +++ b/Stellar/soroban-futurenet-starter/src/mappings/mappingHandlers.ts @@ -7,17 +7,17 @@ import { import { AccountCredited, AccountDebited, -} from "stellar-sdk/lib/horizon/types/effects"; -import { Horizon } from "stellar-sdk"; +} from "@stellar/stellar-sdk/lib/horizon/types/effects"; +import { Horizon } from "@stellar/stellar-sdk"; import { Address, xdr } from "soroban-client"; export async function handleOperation( - op: StellarOperation, + op: StellarOperation ): Promise { logger.info(`Indexing operation ${op.id}, type: ${op.type}`); - const fromAccount = await checkAndGetAccount(op.from, op.ledger.sequence); - const toAccount = await checkAndGetAccount(op.to, op.ledger.sequence); + const fromAccount = await checkAndGetAccount(op.from, op.ledger!.sequence); + const toAccount = await checkAndGetAccount(op.to, op.ledger!.sequence); const payment = Payment.create({ id: op.id, @@ -27,19 +27,19 @@ export async function handleOperation( amount: op.amount, }); - fromAccount.lastSeenLedger = op.ledger.sequence; - toAccount.lastSeenLedger = op.ledger.sequence; + fromAccount.lastSeenLedger = op.ledger!.sequence; + toAccount.lastSeenLedger = op.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), payment.save()]); } export async function handleCredit( - effect: StellarEffect, + effect: StellarEffect ): Promise { logger.info(`Indexing effect ${effect.id}, type: ${effect.type}`); const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const credit = Credit.create({ @@ -48,18 +48,18 @@ export async function handleCredit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), credit.save()]); } export async function handleDebit( - effect: StellarEffect, + effect: StellarEffect ): Promise { logger.info(`Indexing effect ${effect.id}, type: ${effect.type}`); const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const debit = Debit.create({ @@ -68,13 +68,13 @@ export async function handleDebit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), debit.save()]); } export async function handleEvent(event: SorobanEvent): Promise { logger.info( - `New transfer event found at block ${event.ledger.sequence.toString()}`, + `New transfer event found at block ${event.ledger!.sequence.toString()}` ); // Get data from the event @@ -93,32 +93,32 @@ export async function handleEvent(event: SorobanEvent): Promise { const fromAccount = await checkAndGetAccount( decodeAddress(from), - event.ledger.sequence, + event.ledger!.sequence ); const toAccount = await checkAndGetAccount( decodeAddress(to), - event.ledger.sequence, + event.ledger!.sequence ); // Create the new transfer entity const transfer = Transfer.create({ id: event.id, - ledger: event.ledger.sequence, + ledger: event.ledger!.sequence, date: new Date(event.ledgerClosedAt), contract: event.contractId?.contractId().toString()!, fromId: fromAccount.id, toId: toAccount.id, - value: BigInt(event.value.decoded!), + value: BigInt(event.value.i64().toString()), }); - fromAccount.lastSeenLedger = event.ledger.sequence; - toAccount.lastSeenLedger = event.ledger.sequence; + fromAccount.lastSeenLedger = event.ledger!.sequence; + toAccount.lastSeenLedger = event.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), transfer.save()]); } async function checkAndGetAccount( id: string, - ledgerSequence: number, + ledgerSequence: number ): Promise { let account = await Account.get(id.toLowerCase()); if (!account) { diff --git a/Stellar/soroban-greeter-contract/README.md b/Stellar/soroban-greeter-contract/README.md index b8eadd0..a728179 100644 --- a/Stellar/soroban-greeter-contract/README.md +++ b/Stellar/soroban-greeter-contract/README.md @@ -30,7 +30,7 @@ The simplest way to run your project is by running `yarn dev` or `npm run-script 1. `yarn codegen` - Generates types from the GraphQL schema definition and contract ABIs and saves them in the `/src/types` directory. This must be done after each change to the `schema.graphql` file or the contract ABIs 2. `yarn build` - Builds and packages the SubQuery project into the `/dist` directory -3. `docker-compose pull && docker-compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` +3. `docker compose pull && docker compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` You can observe the three services start, and once all are running (it may take a few minutes on your first start), please open your browser and head to [http://localhost:3000](http://localhost:3000) - you should see a GraphQL playground showing with the schemas ready to query. [Read the docs for more information](https://academy.subquery.network/run_publish/run.html) or [explore the possible service configuration for running SubQuery](https://academy.subquery.network/run_publish/references.html). diff --git a/Stellar/soroban-greeter-contract/package.json b/Stellar/soroban-greeter-contract/package.json index 0a84a79..a8f4407 100644 --- a/Stellar/soroban-greeter-contract/package.json +++ b/Stellar/soroban-greeter-contract/package.json @@ -6,8 +6,8 @@ "scripts": { "build": "subql build", "codegen": "subql codegen", - "start:docker": "docker-compose pull && docker-compose up --remove-orphans", - "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", + "start:docker": "docker compose pull && docker compose up --remove-orphans", + "dev": "subql codegen && subql build && docker compose pull && docker compose up --remove-orphans", "prepack": "rm -rf dist && npm run build", "test": "subql build && subql-node-stellar test" }, diff --git a/Stellar/soroban-greeter-contract/project.ts b/Stellar/soroban-greeter-contract/project.ts index 7647f28..4e23907 100644 --- a/Stellar/soroban-greeter-contract/project.ts +++ b/Stellar/soroban-greeter-contract/project.ts @@ -3,7 +3,7 @@ import { StellarHandlerKind, StellarProject, } from "@subql/types-stellar"; -import { Horizon } from "stellar-sdk"; + const project: StellarProject = { specVersion: "1.0.0", name: "soroban-futurenet-starter", diff --git a/Stellar/soroban-greeter-contract/src/mappings/mappingHandlers.ts b/Stellar/soroban-greeter-contract/src/mappings/mappingHandlers.ts index eb2489d..52dad9b 100644 --- a/Stellar/soroban-greeter-contract/src/mappings/mappingHandlers.ts +++ b/Stellar/soroban-greeter-contract/src/mappings/mappingHandlers.ts @@ -2,11 +2,11 @@ import { Increment } from "../types"; import { SorobanEvent } from "@subql/types-stellar"; export async function handleEvent(event: SorobanEvent): Promise { - logger.info(`Transaction hash: ${event.transaction.hash.toString()}`); + logger.info(`Transaction hash: ${event.transaction!.hash.toString()}`); if (event.type.toString() == "contract") { logger.info(`Event value: ${JSON.stringify(event.value)}`); const increment = Increment.create({ - id: event.transaction.hash, + id: event.transaction!.hash, newValue: BigInt( JSON.parse(JSON.stringify(event.value))["_value"].toString(), ), diff --git a/Stellar/soroban-starter/README.md b/Stellar/soroban-starter/README.md index ca91901..f8ffe6b 100644 --- a/Stellar/soroban-starter/README.md +++ b/Stellar/soroban-starter/README.md @@ -30,7 +30,7 @@ The simplest way to run your project is by running `yarn dev` or `npm run-script 1. `yarn codegen` - Generates types from the GraphQL schema definition and contract ABIs and saves them in the `/src/types` directory. This must be done after each change to the `schema.graphql` file or the contract ABIs 2. `yarn build` - Builds and packages the SubQuery project into the `/dist` directory -3. `docker-compose pull && docker-compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` +3. `docker compose pull && docker compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` You can observe the three services start, and once all are running (it may take a few minutes on your first start), please open your browser and head to [http://localhost:3000](http://localhost:3000) - you should see a GraphQL playground showing with the schemas ready to query. [Read the docs for more information](https://academy.subquery.network/run_publish/run.html) or [explore the possible service configuration for running SubQuery](https://academy.subquery.network/run_publish/references.html). diff --git a/Stellar/soroban-starter/package.json b/Stellar/soroban-starter/package.json index ce2a16d..01d3a3b 100644 --- a/Stellar/soroban-starter/package.json +++ b/Stellar/soroban-starter/package.json @@ -6,8 +6,8 @@ "scripts": { "build": "subql build", "codegen": "subql codegen", - "start:docker": "docker-compose pull && docker-compose up --remove-orphans", - "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", + "start:docker": "docker compose pull && docker compose up --remove-orphans", + "dev": "subql codegen && subql build && docker compose pull && docker compose up --remove-orphans", "prepack": "rm -rf dist && npm run build", "test": "subql build && subql-node-stellar test" }, @@ -22,12 +22,13 @@ "license": "MIT", "dependencies": { "@subql/common": "latest", - "@subql/types-stellar": "latest" + "@subql/types-stellar": "latest", + "soroban-client": "^1.0.1" }, "devDependencies": { "@subql/cli": "latest", - "@subql/types": "latest", "@subql/testing": "latest", - "typescript": "latest" + "@subql/types": "latest", + "typescript": "^5.2.2" } } diff --git a/Stellar/soroban-starter/project.ts b/Stellar/soroban-starter/project.ts index a48efa2..6fb3b67 100644 --- a/Stellar/soroban-starter/project.ts +++ b/Stellar/soroban-starter/project.ts @@ -3,7 +3,7 @@ import { StellarHandlerKind, StellarProject, } from "@subql/types-stellar"; -import { Horizon } from "stellar-sdk"; +import { Horizon } from "@stellar/stellar-sdk"; /* This is your project configuration */ const project: StellarProject = { diff --git a/Stellar/soroban-starter/src/mappings/mappingHandlers.ts b/Stellar/soroban-starter/src/mappings/mappingHandlers.ts index 638a289..8bd330c 100644 --- a/Stellar/soroban-starter/src/mappings/mappingHandlers.ts +++ b/Stellar/soroban-starter/src/mappings/mappingHandlers.ts @@ -7,8 +7,8 @@ import { import { AccountCredited, AccountDebited, -} from "stellar-sdk/lib/horizon/types/effects"; -import { Horizon } from "stellar-sdk"; +} from "@stellar/stellar-sdk/lib/horizon/types/effects"; +import { Horizon } from "@stellar/stellar-sdk"; import { Address, xdr } from "soroban-client"; export async function handleOperation( @@ -16,8 +16,8 @@ export async function handleOperation( ): Promise { logger.info(`Indexing operation ${op.id}, type: ${op.type}`); - const fromAccount = await checkAndGetAccount(op.from, op.ledger.sequence); - const toAccount = await checkAndGetAccount(op.to, op.ledger.sequence); + const fromAccount = await checkAndGetAccount(op.from, op.ledger!.sequence); + const toAccount = await checkAndGetAccount(op.to, op.ledger!.sequence); const payment = Payment.create({ id: op.id, @@ -27,8 +27,8 @@ export async function handleOperation( amount: op.amount, }); - fromAccount.lastSeenLedger = op.ledger.sequence; - toAccount.lastSeenLedger = op.ledger.sequence; + fromAccount.lastSeenLedger = op.ledger!.sequence; + toAccount.lastSeenLedger = op.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), payment.save()]); } @@ -39,7 +39,7 @@ export async function handleCredit( const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const credit = Credit.create({ @@ -48,7 +48,7 @@ export async function handleCredit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), credit.save()]); } @@ -59,7 +59,7 @@ export async function handleDebit( const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const debit = Debit.create({ @@ -68,13 +68,13 @@ export async function handleDebit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), debit.save()]); } export async function handleEvent(event: SorobanEvent): Promise { logger.info( - `New transfer event found at block ${event.ledger.sequence.toString()}`, + `New transfer event found at block ${event.ledger!.sequence.toString()}` ); // Get data from the event @@ -93,26 +93,26 @@ export async function handleEvent(event: SorobanEvent): Promise { const fromAccount = await checkAndGetAccount( decodeAddress(from), - event.ledger.sequence, + event.ledger!.sequence ); const toAccount = await checkAndGetAccount( decodeAddress(to), - event.ledger.sequence, + event.ledger!.sequence ); // Create the new transfer entity const transfer = Transfer.create({ id: event.id, - ledger: event.ledger.sequence, + ledger: event.ledger!.sequence, date: new Date(event.ledgerClosedAt), contract: event.contractId?.contractId().toString()!, fromId: fromAccount.id, toId: toAccount.id, - value: BigInt(event.value.decoded!), + value: BigInt(event.value.i64().toString()), }); - fromAccount.lastSeenLedger = event.ledger.sequence; - toAccount.lastSeenLedger = event.ledger.sequence; + fromAccount.lastSeenLedger = event.ledger!.sequence; + toAccount.lastSeenLedger = event.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), transfer.save()]); } diff --git a/Stellar/soroban-testnet-starter/README.md b/Stellar/soroban-testnet-starter/README.md index 375516e..a73c3ed 100644 --- a/Stellar/soroban-testnet-starter/README.md +++ b/Stellar/soroban-testnet-starter/README.md @@ -30,7 +30,7 @@ The simplest way to run your project is by running `yarn dev` or `npm run-script 1. `yarn codegen` - Generates types from the GraphQL schema definition and contract ABIs and saves them in the `/src/types` directory. This must be done after each change to the `schema.graphql` file or the contract ABIs 2. `yarn build` - Builds and packages the SubQuery project into the `/dist` directory -3. `docker-compose pull && docker-compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` +3. `docker compose pull && docker compose up` - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires [Docker to be installed](https://docs.docker.com/engine/install) and running locally. The configuration for this container is set from your `docker-compose.yml` You can observe the three services start, and once all are running (it may take a few minutes on your first start), please open your browser and head to [http://localhost:3000](http://localhost:3000) - you should see a GraphQL playground showing with the schemas ready to query. [Read the docs for more information](https://academy.subquery.network/run_publish/run.html) or [explore the possible service configuration for running SubQuery](https://academy.subquery.network/run_publish/references.html). diff --git a/Stellar/soroban-testnet-starter/package.json b/Stellar/soroban-testnet-starter/package.json index 890a4a7..312a6be 100644 --- a/Stellar/soroban-testnet-starter/package.json +++ b/Stellar/soroban-testnet-starter/package.json @@ -6,8 +6,8 @@ "scripts": { "build": "subql build", "codegen": "subql codegen", - "start:docker": "docker-compose pull && docker-compose up --remove-orphans", - "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", + "start:docker": "docker compose pull && docker compose up --remove-orphans", + "dev": "subql codegen && subql build && docker compose pull && docker compose up --remove-orphans", "prepack": "rm -rf dist && npm run build", "test": "subql build && subql-node-stellar test" }, diff --git a/Stellar/soroban-testnet-starter/project.ts b/Stellar/soroban-testnet-starter/project.ts index 5ff97fb..43e9b7f 100644 --- a/Stellar/soroban-testnet-starter/project.ts +++ b/Stellar/soroban-testnet-starter/project.ts @@ -3,7 +3,7 @@ import { StellarHandlerKind, StellarProject, } from "@subql/types-stellar"; -import { Horizon } from "stellar-sdk"; +import { Horizon } from "@stellar/stellar-sdk"; /* This is your project configuration */ const project: StellarProject = { diff --git a/Stellar/soroban-testnet-starter/src/mappings/mappingHandlers.ts b/Stellar/soroban-testnet-starter/src/mappings/mappingHandlers.ts index 638a289..93c459d 100644 --- a/Stellar/soroban-testnet-starter/src/mappings/mappingHandlers.ts +++ b/Stellar/soroban-testnet-starter/src/mappings/mappingHandlers.ts @@ -7,17 +7,17 @@ import { import { AccountCredited, AccountDebited, -} from "stellar-sdk/lib/horizon/types/effects"; -import { Horizon } from "stellar-sdk"; +} from "@stellar/stellar-sdk/lib/horizon/types/effects"; +import { Horizon } from "@stellar/stellar-sdk"; import { Address, xdr } from "soroban-client"; export async function handleOperation( - op: StellarOperation, + op: StellarOperation ): Promise { logger.info(`Indexing operation ${op.id}, type: ${op.type}`); - const fromAccount = await checkAndGetAccount(op.from, op.ledger.sequence); - const toAccount = await checkAndGetAccount(op.to, op.ledger.sequence); + const fromAccount = await checkAndGetAccount(op.from, op.ledger!.sequence); + const toAccount = await checkAndGetAccount(op.to, op.ledger!.sequence); const payment = Payment.create({ id: op.id, @@ -27,19 +27,19 @@ export async function handleOperation( amount: op.amount, }); - fromAccount.lastSeenLedger = op.ledger.sequence; - toAccount.lastSeenLedger = op.ledger.sequence; + fromAccount.lastSeenLedger = op.ledger!.sequence; + toAccount.lastSeenLedger = op.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), payment.save()]); } export async function handleCredit( - effect: StellarEffect, + effect: StellarEffect ): Promise { logger.info(`Indexing effect ${effect.id}, type: ${effect.type}`); const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const credit = Credit.create({ @@ -48,18 +48,18 @@ export async function handleCredit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), credit.save()]); } export async function handleDebit( - effect: StellarEffect, + effect: StellarEffect ): Promise { logger.info(`Indexing effect ${effect.id}, type: ${effect.type}`); const account = await checkAndGetAccount( effect.account, - effect.ledger.sequence, + effect.ledger!.sequence ); const debit = Debit.create({ @@ -68,13 +68,13 @@ export async function handleDebit( amount: effect.amount, }); - account.lastSeenLedger = effect.ledger.sequence; + account.lastSeenLedger = effect.ledger!.sequence; await Promise.all([account.save(), debit.save()]); } export async function handleEvent(event: SorobanEvent): Promise { logger.info( - `New transfer event found at block ${event.ledger.sequence.toString()}`, + `New transfer event found at block ${event.ledger!.sequence.toString()}` ); // Get data from the event @@ -93,32 +93,32 @@ export async function handleEvent(event: SorobanEvent): Promise { const fromAccount = await checkAndGetAccount( decodeAddress(from), - event.ledger.sequence, + event.ledger!.sequence ); const toAccount = await checkAndGetAccount( decodeAddress(to), - event.ledger.sequence, + event.ledger!.sequence ); // Create the new transfer entity const transfer = Transfer.create({ id: event.id, - ledger: event.ledger.sequence, + ledger: event.ledger!.sequence, date: new Date(event.ledgerClosedAt), contract: event.contractId?.contractId().toString()!, fromId: fromAccount.id, toId: toAccount.id, - value: BigInt(event.value.decoded!), + value: BigInt(event.value.i64().toString()), }); - fromAccount.lastSeenLedger = event.ledger.sequence; - toAccount.lastSeenLedger = event.ledger.sequence; + fromAccount.lastSeenLedger = event.ledger!.sequence; + toAccount.lastSeenLedger = event.ledger!.sequence; await Promise.all([fromAccount.save(), toAccount.save(), transfer.save()]); } async function checkAndGetAccount( id: string, - ledgerSequence: number, + ledgerSequence: number ): Promise { let account = await Account.get(id.toLowerCase()); if (!account) {