diff --git a/express_relay/sdk/js/src/examples/simpleSearcherLimo.ts b/express_relay/sdk/js/src/examples/simpleSearcherLimo.ts index a21048814c..b01f609615 100644 --- a/express_relay/sdk/js/src/examples/simpleSearcherLimo.ts +++ b/express_relay/sdk/js/src/examples/simpleSearcherLimo.ts @@ -60,12 +60,13 @@ class SimpleSearcherLimo { ); } - async getMintDecimals(mint: PublicKey): Promise { - if (this.mintDecimals[mint.toBase58()]) { - return this.mintDecimals[mint.toBase58()]; + async getMintDecimalsCached(mint: PublicKey): Promise { + const mintAddress = mint.toBase58(); + if (this.mintDecimals[mintAddress]) { + return this.mintDecimals[mintAddress]; } const decimals = await getMintDecimals(this.connectionSvm, mint); - this.mintDecimals[mint.toBase58()] = decimals; + this.mintDecimals[mintAddress] = decimals; return decimals; } @@ -75,8 +76,10 @@ class SimpleSearcherLimo { this.connectionSvm, order.state.globalConfig ); - const inputMintDecimals = await this.getMintDecimals(order.state.inputMint); - const outputMintDecimals = await this.getMintDecimals( + const inputMintDecimals = await this.getMintDecimalsCached( + order.state.inputMint + ); + const outputMintDecimals = await this.getMintDecimalsCached( order.state.outputMint ); const inputAmountDecimals = new Decimal( diff --git a/express_relay/sdk/python/README.md b/express_relay/sdk/python/README.md index 8a625731b9..93093dcca2 100644 --- a/express_relay/sdk/python/README.md +++ b/express_relay/sdk/python/README.md @@ -39,6 +39,5 @@ $ poetry run python3 -m express_relay.searcher.examples.simple_searcher_svm \ --chain-id development-solana \ --private-key-json-file \ --endpoint-svm https://api.mainnet-beta.solana.com \ ---global-config TeStcUQMmECYEtdeXo9cXpktQWaGe4bhJ7zxAUMzB2X \ ---bid 10000000 +--bid 10000000 # Bid amount in lamports ```