@cryptorubic/core 0.12.6 → 0.13.0-alpha.solana-gas.2
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 +1 -1
- package/src/lib/blockchains/wrapped-addresses.d.ts +2 -2
- package/src/lib/blockchains/wrapped-addresses.js +0 -1
- package/src/lib/models/api/foreign-blacklist.interface.js +2 -0
- package/src/lib/tokens/price-token-amount.js +1 -0
- package/src/lib/tokens/price-token.js +1 -0
- package/src/lib/tokens/token-amount.js +1 -0
- package/src/lib/tokens/token.js +13 -4
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const wrappedAddress: Partial<Record<
|
|
1
|
+
import { EvmBlockchainName } from './blockchain-name';
|
|
2
|
+
export declare const wrappedAddress: Partial<Record<EvmBlockchainName, string>>;
|
|
@@ -62,7 +62,6 @@ exports.wrappedAddress = {
|
|
|
62
62
|
[blockchain_name_1.BLOCKCHAIN_NAME.UNICHAIN]: '0x4200000000000000000000000000000000000006',
|
|
63
63
|
[blockchain_name_1.BLOCKCHAIN_NAME.MORPH]: '0x5300000000000000000000000000000000000011',
|
|
64
64
|
[blockchain_name_1.BLOCKCHAIN_NAME.HEMI]: '0x4200000000000000000000000000000000000006',
|
|
65
|
-
[blockchain_name_1.BLOCKCHAIN_NAME.SOLANA]: 'So11111111111111111111111111111111111111112',
|
|
66
65
|
// Testnet
|
|
67
66
|
[blockchain_name_1.BLOCKCHAIN_NAME.GOERLI]: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6',
|
|
68
67
|
[blockchain_name_1.BLOCKCHAIN_NAME.SCROLL_SEPOLIA]: '0x5300000000000000000000000000000000000004',
|
package/src/lib/tokens/token.js
CHANGED
|
@@ -11,6 +11,12 @@ class Token {
|
|
|
11
11
|
static tokensToAddresses(tokens) {
|
|
12
12
|
return tokens.map((token) => token.address);
|
|
13
13
|
}
|
|
14
|
+
logger;
|
|
15
|
+
blockchain;
|
|
16
|
+
address;
|
|
17
|
+
name;
|
|
18
|
+
symbol;
|
|
19
|
+
decimals;
|
|
14
20
|
get isNative() {
|
|
15
21
|
const nativeAddress = blockchains_info_1.BlockchainsInfo.isSolanaBlockchainName(this.blockchain)
|
|
16
22
|
? 'So11111111111111111111111111111111111111111'
|
|
@@ -18,11 +24,14 @@ class Token {
|
|
|
18
24
|
return nativeAddress.toLowerCase() === this.address.toLowerCase();
|
|
19
25
|
}
|
|
20
26
|
get isWrapped() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
if (blockchains_info_1.BlockchainsInfo.isEvmBlockchainName(this.blockchain)) {
|
|
28
|
+
const address = wrapped_addresses_1.wrappedAddress[this.blockchain];
|
|
29
|
+
if (!address) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return address.toLowerCase() === this.address.toLowerCase();
|
|
24
33
|
}
|
|
25
|
-
return
|
|
34
|
+
return false;
|
|
26
35
|
}
|
|
27
36
|
get asStruct() {
|
|
28
37
|
return {
|