@cryptorubic/web3 0.7.11 → 0.7.12-alpha-morph-api.1

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
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "0.7.11",
3
+ "version": "0.7.12-alpha-morph-api.1",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0",
6
6
  "bignumber.js": "9.1.2",
7
- "@cryptorubic/core": "0.7.11",
7
+ "@cryptorubic/core": "0.7.12-alpha-morph-api.1",
8
8
  "viem": "^2.19.1",
9
9
  "web3-utils": "^4.3.1",
10
10
  "@ton/ton": "^15.1.0",
11
11
  "@solana/web3.js": "1.95.3",
12
12
  "@solflare-wallet/utl-sdk": "^1.4.0",
13
13
  "@ethersproject/bignumber": "^5.7.0",
14
- "@cryptorubic/tron-types": "0.7.11",
14
+ "@cryptorubic/tron-types": "0.7.12-alpha-morph-api.1",
15
15
  "bitcoin-address-validation": "^2.2.3",
16
16
  "axios": "0.27.2",
17
17
  "crc-32": "^1.2.2",
@@ -1,9 +1,6 @@
1
- import { BlockchainName, TokenAmount } from '@cryptorubic/core';
1
+ import { TokenAmount } from '@cryptorubic/core';
2
2
  import { AllowanceInfo } from './common-types';
3
- import { AbstractAdapter } from '../abstract-adapter';
4
- import { EvmTransactionConfig } from '../../../utils/models/evm-transaction-config';
5
- import { TronTransactionConfig } from '@cryptorubic/tron-types';
6
- export interface ApproveAdapter<T> extends AbstractAdapter<any, any, BlockchainName> {
3
+ export interface ApproveAdapter<T> {
7
4
  /**
8
5
  * @param fromTokenAddress erc20 address of checked token
9
6
  * @param walletAddress owner wallet address
@@ -34,4 +31,3 @@ export interface ApproveAdapter<T> extends AbstractAdapter<any, any, BlockchainN
34
31
  */
35
32
  approve(walletAddress: string, tokenAddress: string, spenderAddress: string, amount?: string): Promise<string>;
36
33
  }
37
- export declare function isApprovableAdapter(adapter: AbstractAdapter<any, any, BlockchainName>): adapter is ApproveAdapter<EvmTransactionConfig | TronTransactionConfig>;
@@ -1,6 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isApprovableAdapter = isApprovableAdapter;
4
- function isApprovableAdapter(adapter) {
5
- return 'needApprove' in adapter && 'approve' in adapter && 'getAllowance' in adapter && 'encodeApprove' in adapter;
6
- }
@@ -1389,5 +1389,32 @@ exports.viemConfig = {
1389
1389
  address: '0xcA11bde05977b3631167028862bE2a173976CA11'
1390
1390
  }
1391
1391
  }
1392
+ }),
1393
+ MORPH: (0, viem_1.defineChain)({
1394
+ id: 2818,
1395
+ name: 'Morph',
1396
+ nativeCurrency: {
1397
+ decimals: 18,
1398
+ name: 'Ether',
1399
+ symbol: 'ETH'
1400
+ },
1401
+ rpcUrls: {
1402
+ default: {
1403
+ http: ['https://rpc.morphl2.io'],
1404
+ webSocket: ['wss://rpc.morphl2.io:8443']
1405
+ }
1406
+ },
1407
+ blockExplorers: {
1408
+ default: {
1409
+ name: 'Morph Explorer',
1410
+ url: 'https://explorer.morphl2.io'
1411
+ }
1412
+ },
1413
+ testnet: false,
1414
+ contracts: {
1415
+ multicall3: {
1416
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11'
1417
+ }
1418
+ }
1392
1419
  })
1393
1420
  };
@@ -74,5 +74,6 @@ exports.viemBlockchainMapping = {
74
74
  [core_1.BLOCKCHAIN_NAME.FRAXTAL]: chains_1.fraxtal,
75
75
  [core_1.BLOCKCHAIN_NAME.CORE]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.CORE],
76
76
  [core_1.BLOCKCHAIN_NAME.BERACHAIN]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.BERACHAIN],
77
- [core_1.BLOCKCHAIN_NAME.SONEIUM]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.SONEIUM]
77
+ [core_1.BLOCKCHAIN_NAME.SONEIUM]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.SONEIUM],
78
+ [core_1.BLOCKCHAIN_NAME.MORPH]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.MORPH]
78
79
  };