@cryptorubic/web3 1.1.0-alpha-stellar.10 → 1.1.0-alpha-stellar.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,14 +3,14 @@ import { AbstractAdapter } from '../common/abstract-adapter';
|
|
|
3
3
|
import { StellarClient } from './models/stellar-client';
|
|
4
4
|
import { StellarWallet } from './models/stellar-wallet';
|
|
5
5
|
import { TxStatus } from '../models/web3-public-models/tx-status';
|
|
6
|
-
import { StellarTransactionConfig } from '../../../utils/models/stellar-transaction-config';
|
|
7
6
|
import { ClientAdaptersFactoryParams } from '../../models/create-factory-params';
|
|
8
7
|
import { StellarAdapterSigner } from './signer/stellar-adapter-signer';
|
|
9
8
|
import BigNumber from 'bignumber.js';
|
|
10
|
-
import { Abi } from 'viem';
|
|
11
9
|
import { Web3PrimitiveType } from '../../../utils/models/primitive-types';
|
|
12
|
-
import {
|
|
10
|
+
import { Abi } from 'viem';
|
|
13
11
|
import { MethodData } from '../models/web3-public-models/method-data';
|
|
12
|
+
import { ContractMulticallResponse } from '../models/web3-public-models/contract-multicall-response';
|
|
13
|
+
import { StellarTransactionConfig } from '../../../utils/models/stellar-transaction-config';
|
|
14
14
|
export declare class StellarAdapter extends AbstractAdapter<StellarClient, StellarWallet, StellarBlockchainName> {
|
|
15
15
|
private readonly rpcList;
|
|
16
16
|
readonly signer: StellarAdapterSigner;
|
|
@@ -48,17 +48,15 @@ class StellarAdapter extends abstract_adapter_1.AbstractAdapter {
|
|
|
48
48
|
async callForTokenInfo(tokenAddress) {
|
|
49
49
|
const metadata = ['name', 'symbol', 'decimals'];
|
|
50
50
|
const contract = new stellar_sdk_1.Contract(this.getTokenContractId(tokenAddress));
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
builder.operations.push(contract.call(value));
|
|
61
|
-
const resp = await this.public.simulateTransaction(builder);
|
|
51
|
+
const [name, symbol, decimals] = await Promise.all(metadata.map(async (method) => {
|
|
52
|
+
const tx = new stellar_sdk_1.TransactionBuilder(new stellar_sdk_1.Account(fake_stellar_wallet_1.FAKE_STELLAR_WALLET, '0'), {
|
|
53
|
+
fee: stellar_sdk_1.BASE_FEE,
|
|
54
|
+
networkPassphrase: stellar_sdk_1.Networks.PUBLIC
|
|
55
|
+
})
|
|
56
|
+
.addOperation(contract.call(method))
|
|
57
|
+
.setTimeout(30)
|
|
58
|
+
.build();
|
|
59
|
+
const resp = await this.public.simulateTransaction(tx);
|
|
62
60
|
if ('error' in resp) {
|
|
63
61
|
throw new Error(resp.error);
|
|
64
62
|
}
|