@atomiqlabs/chain-evm 1.0.0-dev.87 → 1.0.0-dev.88
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/dist/chains/botanix/BotanixChainType.d.ts +1 -1
- package/dist/chains/botanix/BotanixInitializer.js +12 -12
- package/dist/chains/citrea/CitreaChainType.d.ts +1 -1
- package/dist/evm/chain/EVMChainInterface.d.ts +3 -3
- package/dist/evm/chain/EVMModule.d.ts +3 -3
- package/package.json +1 -1
- package/src/chains/botanix/BotanixChainType.ts +1 -1
- package/src/chains/botanix/BotanixInitializer.ts +12 -12
- package/src/chains/citrea/CitreaChainType.ts +1 -1
- package/src/evm/chain/EVMChainInterface.ts +3 -3
- package/src/evm/chain/EVMModule.ts +3 -3
|
@@ -10,4 +10,4 @@ import { EVMSpvWithdrawalData } from "../../evm/spv_swap/EVMSpvWithdrawalData";
|
|
|
10
10
|
import { EVMSwapContract } from "../../evm/swaps/EVMSwapContract";
|
|
11
11
|
import { EVMBtcRelay } from "../../evm/btcrelay/EVMBtcRelay";
|
|
12
12
|
import { EVMSpvVaultContract } from "../../evm/spv_swap/EVMSpvVaultContract";
|
|
13
|
-
export type BotanixChainType = ChainType<"BOTANIX", never, EVMPreFetchVerification, EVMTx, EVMSigner, EVMSwapData, EVMSwapContract<"BOTANIX">, EVMChainInterface<"BOTANIX"
|
|
13
|
+
export type BotanixChainType = ChainType<"BOTANIX", never, EVMPreFetchVerification, EVMTx, EVMSigner, EVMSwapData, EVMSwapContract<"BOTANIX">, EVMChainInterface<"BOTANIX">, EVMChainEventsBrowser, EVMBtcRelay<any>, EVMSpvVaultData, EVMSpvWithdrawalData, EVMSpvVaultContract<"BOTANIX">>;
|
|
@@ -13,26 +13,26 @@ const EVMSwapData_1 = require("../../evm/swaps/EVMSwapData");
|
|
|
13
13
|
const EVMSpvVaultData_1 = require("../../evm/spv_swap/EVMSpvVaultData");
|
|
14
14
|
const EVMSpvWithdrawalData_1 = require("../../evm/spv_swap/EVMSpvWithdrawalData");
|
|
15
15
|
const BotanixChainIds = {
|
|
16
|
-
MAINNET:
|
|
16
|
+
MAINNET: 3637,
|
|
17
17
|
TESTNET: 3636
|
|
18
18
|
};
|
|
19
19
|
const BotanixContractAddresses = {
|
|
20
20
|
MAINNET: {
|
|
21
|
-
executionContract: "",
|
|
22
|
-
swapContract: "",
|
|
23
|
-
btcRelayContract: "",
|
|
24
|
-
btcRelayDeploymentHeight:
|
|
25
|
-
spvVaultContract: "",
|
|
26
|
-
spvVaultDeploymentHeight:
|
|
21
|
+
executionContract: "0x5bb0C725939cB825d1322A99a3FeB570097628c3",
|
|
22
|
+
swapContract: "0x8A44f1995a54fD976c904Cccf9EbaB49c3182eb3",
|
|
23
|
+
btcRelayContract: "0x6a373b6Adad83964727bA0fa15E22Be05173fc12",
|
|
24
|
+
btcRelayDeploymentHeight: 1791247,
|
|
25
|
+
spvVaultContract: "0xc98Ef084d3911C8447DBbE4dDa18bC2c9bB0584e",
|
|
26
|
+
spvVaultDeploymentHeight: 1791249,
|
|
27
27
|
handlerContracts: {
|
|
28
28
|
refund: {
|
|
29
|
-
timelock: ""
|
|
29
|
+
timelock: "0x3887B02217726bB36958Dd595e57293fB63D5082"
|
|
30
30
|
},
|
|
31
31
|
claim: {
|
|
32
|
-
[base_1.ChainSwapType.HTLC]: "",
|
|
33
|
-
[base_1.ChainSwapType.CHAIN_TXID]: "",
|
|
34
|
-
[base_1.ChainSwapType.CHAIN]: "",
|
|
35
|
-
[base_1.ChainSwapType.CHAIN_NONCED]: ""
|
|
32
|
+
[base_1.ChainSwapType.HTLC]: "0x59A54378B6bA9C21ba66487C6A701D702baDEabE",
|
|
33
|
+
[base_1.ChainSwapType.CHAIN_TXID]: "0x32EB4DbDdC31e19ba908fecc7cae03F0d04F01Fa",
|
|
34
|
+
[base_1.ChainSwapType.CHAIN]: "0xaB2D14745362B26a732dD8B7F95daAE3D2914bBF",
|
|
35
|
+
[base_1.ChainSwapType.CHAIN_NONCED]: "0x2920EE496693A5027249a027A6FD3F643E743745"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -10,4 +10,4 @@ import { EVMSpvWithdrawalData } from "../../evm/spv_swap/EVMSpvWithdrawalData";
|
|
|
10
10
|
import { CitreaSwapContract } from "./CitreaSwapContract";
|
|
11
11
|
import { CitreaBtcRelay } from "./CitreaBtcRelay";
|
|
12
12
|
import { CitreaSpvVaultContract } from "./CitreaSpvVaultContract";
|
|
13
|
-
export type CitreaChainType = ChainType<"CITREA", never, EVMPreFetchVerification, EVMTx, EVMSigner, EVMSwapData, CitreaSwapContract, EVMChainInterface<"CITREA"
|
|
13
|
+
export type CitreaChainType = ChainType<"CITREA", never, EVMPreFetchVerification, EVMTx, EVMSigner, EVMSwapData, CitreaSwapContract, EVMChainInterface<"CITREA">, EVMChainEventsBrowser, CitreaBtcRelay<any>, EVMSpvVaultData, EVMSpvWithdrawalData, CitreaSpvVaultContract>;
|
|
@@ -17,11 +17,11 @@ export type EVMConfiguration = {
|
|
|
17
17
|
safeBlockTag: EVMBlockTag;
|
|
18
18
|
maxLogsBlockRange: number;
|
|
19
19
|
};
|
|
20
|
-
export declare class EVMChainInterface<ChainId extends string = string
|
|
20
|
+
export declare class EVMChainInterface<ChainId extends string = string> implements ChainInterface {
|
|
21
21
|
readonly chainId: ChainId;
|
|
22
22
|
readonly provider: JsonRpcApiProvider;
|
|
23
23
|
readonly retryPolicy: EVMRetryPolicy;
|
|
24
|
-
readonly evmChainId:
|
|
24
|
+
readonly evmChainId: number;
|
|
25
25
|
readonly config: EVMConfiguration;
|
|
26
26
|
Fees: EVMFees;
|
|
27
27
|
Tokens: EVMTokens;
|
|
@@ -30,7 +30,7 @@ export declare class EVMChainInterface<ChainId extends string = string, EVMChain
|
|
|
30
30
|
Events: EVMEvents;
|
|
31
31
|
Blocks: EVMBlocks;
|
|
32
32
|
protected logger: LoggerType;
|
|
33
|
-
constructor(chainId: ChainId, evmChainId:
|
|
33
|
+
constructor(chainId: ChainId, evmChainId: number, provider: JsonRpcApiProvider, config: EVMConfiguration, retryPolicy?: EVMRetryPolicy, evmFeeEstimator?: EVMFees);
|
|
34
34
|
getBalance(signer: string, tokenAddress: string): Promise<bigint>;
|
|
35
35
|
getNativeCurrencyAddress(): string;
|
|
36
36
|
isValidToken(tokenIdentifier: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JsonRpcApiProvider } from "ethers";
|
|
2
2
|
import { EVMChainInterface, EVMRetryPolicy } from "./EVMChainInterface";
|
|
3
|
-
export declare class EVMModule<ChainId extends string = string
|
|
3
|
+
export declare class EVMModule<ChainId extends string = string> {
|
|
4
4
|
protected readonly provider: JsonRpcApiProvider;
|
|
5
5
|
protected readonly retryPolicy: EVMRetryPolicy;
|
|
6
|
-
protected readonly root: EVMChainInterface<ChainId
|
|
6
|
+
protected readonly root: EVMChainInterface<ChainId>;
|
|
7
7
|
protected readonly logger: import("../../utils/Utils").LoggerType;
|
|
8
|
-
constructor(root: EVMChainInterface<ChainId
|
|
8
|
+
constructor(root: EVMChainInterface<ChainId>);
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -12,27 +12,27 @@ import {EVMSpvWithdrawalData} from "../../evm/spv_swap/EVMSpvWithdrawalData";
|
|
|
12
12
|
import {BotanixChainType} from "./BotanixChainType";
|
|
13
13
|
|
|
14
14
|
const BotanixChainIds = {
|
|
15
|
-
MAINNET:
|
|
15
|
+
MAINNET: 3637,
|
|
16
16
|
TESTNET: 3636
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const BotanixContractAddresses = {
|
|
20
20
|
MAINNET: {
|
|
21
|
-
executionContract: "",
|
|
22
|
-
swapContract: "",
|
|
23
|
-
btcRelayContract: "",
|
|
24
|
-
btcRelayDeploymentHeight:
|
|
25
|
-
spvVaultContract: "",
|
|
26
|
-
spvVaultDeploymentHeight:
|
|
21
|
+
executionContract: "0x5bb0C725939cB825d1322A99a3FeB570097628c3",
|
|
22
|
+
swapContract: "0x8A44f1995a54fD976c904Cccf9EbaB49c3182eb3",
|
|
23
|
+
btcRelayContract: "0x6a373b6Adad83964727bA0fa15E22Be05173fc12",
|
|
24
|
+
btcRelayDeploymentHeight: 1791247,
|
|
25
|
+
spvVaultContract: "0xc98Ef084d3911C8447DBbE4dDa18bC2c9bB0584e",
|
|
26
|
+
spvVaultDeploymentHeight: 1791249,
|
|
27
27
|
handlerContracts: {
|
|
28
28
|
refund: {
|
|
29
|
-
timelock: ""
|
|
29
|
+
timelock: "0x3887B02217726bB36958Dd595e57293fB63D5082"
|
|
30
30
|
},
|
|
31
31
|
claim: {
|
|
32
|
-
[ChainSwapType.HTLC]: "",
|
|
33
|
-
[ChainSwapType.CHAIN_TXID]: "",
|
|
34
|
-
[ChainSwapType.CHAIN]: "",
|
|
35
|
-
[ChainSwapType.CHAIN_NONCED]: ""
|
|
32
|
+
[ChainSwapType.HTLC]: "0x59A54378B6bA9C21ba66487C6A701D702baDEabE",
|
|
33
|
+
[ChainSwapType.CHAIN_TXID]: "0x32EB4DbDdC31e19ba908fecc7cae03F0d04F01Fa",
|
|
34
|
+
[ChainSwapType.CHAIN]: "0xaB2D14745362B26a732dD8B7F95daAE3D2914bBF",
|
|
35
|
+
[ChainSwapType.CHAIN_NONCED]: "0x2920EE496693A5027249a027A6FD3F643E743745"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
@@ -21,14 +21,14 @@ export type EVMConfiguration = {
|
|
|
21
21
|
maxLogsBlockRange: number
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export class EVMChainInterface<ChainId extends string = string
|
|
24
|
+
export class EVMChainInterface<ChainId extends string = string> implements ChainInterface {
|
|
25
25
|
|
|
26
26
|
readonly chainId: ChainId;
|
|
27
27
|
|
|
28
28
|
readonly provider: JsonRpcApiProvider;
|
|
29
29
|
readonly retryPolicy: EVMRetryPolicy;
|
|
30
30
|
|
|
31
|
-
public readonly evmChainId:
|
|
31
|
+
public readonly evmChainId: number;
|
|
32
32
|
|
|
33
33
|
public readonly config: EVMConfiguration;
|
|
34
34
|
|
|
@@ -43,7 +43,7 @@ export class EVMChainInterface<ChainId extends string = string, EVMChainId exten
|
|
|
43
43
|
|
|
44
44
|
constructor(
|
|
45
45
|
chainId: ChainId,
|
|
46
|
-
evmChainId:
|
|
46
|
+
evmChainId: number,
|
|
47
47
|
provider: JsonRpcApiProvider,
|
|
48
48
|
config: EVMConfiguration,
|
|
49
49
|
retryPolicy?: EVMRetryPolicy,
|
|
@@ -2,16 +2,16 @@ import {getLogger} from "../../utils/Utils";
|
|
|
2
2
|
import {JsonRpcApiProvider} from "ethers";
|
|
3
3
|
import {EVMChainInterface, EVMRetryPolicy} from "./EVMChainInterface";
|
|
4
4
|
|
|
5
|
-
export class EVMModule<ChainId extends string = string
|
|
5
|
+
export class EVMModule<ChainId extends string = string> {
|
|
6
6
|
|
|
7
7
|
protected readonly provider: JsonRpcApiProvider;
|
|
8
8
|
protected readonly retryPolicy: EVMRetryPolicy;
|
|
9
|
-
protected readonly root: EVMChainInterface<ChainId
|
|
9
|
+
protected readonly root: EVMChainInterface<ChainId>;
|
|
10
10
|
|
|
11
11
|
protected readonly logger = getLogger(this.constructor.name+": ");
|
|
12
12
|
|
|
13
13
|
constructor(
|
|
14
|
-
root: EVMChainInterface<ChainId
|
|
14
|
+
root: EVMChainInterface<ChainId>
|
|
15
15
|
) {
|
|
16
16
|
this.provider = root.provider;
|
|
17
17
|
this.retryPolicy = root.retryPolicy;
|