@atomiqlabs/chain-evm 1.0.0-dev.40 → 1.0.0-dev.42
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/BotanixInitializer.d.ts +1 -1
- package/dist/chains/botanix/BotanixInitializer.js +7 -4
- package/dist/evm/chain/modules/EVMTransactions.js +2 -2
- package/package.json +1 -1
- package/src/chains/botanix/BotanixInitializer.ts +8 -5
- package/src/evm/chain/modules/EVMTransactions.ts +2 -2
|
@@ -8,7 +8,7 @@ export declare const BotanixAssets: BotanixAssetsType;
|
|
|
8
8
|
export type BotanixOptions = {
|
|
9
9
|
rpcUrl: string | JsonRpcApiProvider;
|
|
10
10
|
retryPolicy?: EVMRetryPolicy;
|
|
11
|
-
chainType?: "MAINNET" | "
|
|
11
|
+
chainType?: "MAINNET" | "TESTNET";
|
|
12
12
|
maxLogsBlockRange?: number;
|
|
13
13
|
swapContract?: string;
|
|
14
14
|
btcRelayContract?: string;
|
|
@@ -14,7 +14,7 @@ const EVMSpvVaultData_1 = require("../../evm/spv_swap/EVMSpvVaultData");
|
|
|
14
14
|
const EVMSpvWithdrawalData_1 = require("../../evm/spv_swap/EVMSpvWithdrawalData");
|
|
15
15
|
const BotanixChainIds = {
|
|
16
16
|
MAINNET: null,
|
|
17
|
-
|
|
17
|
+
TESTNET: 3636
|
|
18
18
|
};
|
|
19
19
|
const BotanixContractAddresses = {
|
|
20
20
|
MAINNET: {
|
|
@@ -36,11 +36,11 @@ const BotanixContractAddresses = {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
TESTNET: {
|
|
40
40
|
executionContract: "0xBbf7755b674dD107d59F0650D1A3fA9C60bf6Fe6",
|
|
41
41
|
swapContract: "0xf61D1da542111216337FeEA5586022130D468842",
|
|
42
|
-
btcRelayContract: "
|
|
43
|
-
btcRelayDeploymentHeight:
|
|
42
|
+
btcRelayContract: "0xba7E78011909e3501027FBc226a04DCC837a555D",
|
|
43
|
+
btcRelayDeploymentHeight: 3462466,
|
|
44
44
|
spvVaultContract: "0x1120e1Eb3049148AeBEe497331774BfE1f6c174D",
|
|
45
45
|
spvVaultDeploymentHeight: 3425257,
|
|
46
46
|
handlerContracts: {
|
|
@@ -69,6 +69,9 @@ function initializeBotanix(options, bitcoinRpc, network) {
|
|
|
69
69
|
case base_1.BitcoinNetwork.MAINNET:
|
|
70
70
|
options.chainType = "MAINNET";
|
|
71
71
|
break;
|
|
72
|
+
case base_1.BitcoinNetwork.TESTNET:
|
|
73
|
+
options.chainType = "TESTNET";
|
|
74
|
+
break;
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
const defaultContractAddresses = BotanixContractAddresses[options.chainType];
|
|
@@ -117,7 +117,7 @@ class EVMTransactions extends EVMModule_1.EVMModule {
|
|
|
117
117
|
const txIds = [];
|
|
118
118
|
if (parallel) {
|
|
119
119
|
const promises = [];
|
|
120
|
-
for (let i = 0; i <
|
|
120
|
+
for (let i = 0; i < txs.length; i++) {
|
|
121
121
|
let tx;
|
|
122
122
|
if (signer.isBrowserWallet) {
|
|
123
123
|
tx = await signer.account.sendTransaction(txs[i]);
|
|
@@ -136,7 +136,7 @@ class EVMTransactions extends EVMModule_1.EVMModule {
|
|
|
136
136
|
await Promise.all(promises);
|
|
137
137
|
}
|
|
138
138
|
else {
|
|
139
|
-
for (let i = 0; i <
|
|
139
|
+
for (let i = 0; i < txs.length; i++) {
|
|
140
140
|
let tx;
|
|
141
141
|
if (signer.isBrowserWallet) {
|
|
142
142
|
tx = await signer.account.sendTransaction(txs[i]);
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import {BotanixChainType} from "./BotanixChainType";
|
|
|
13
13
|
|
|
14
14
|
const BotanixChainIds = {
|
|
15
15
|
MAINNET: null,
|
|
16
|
-
|
|
16
|
+
TESTNET: 3636
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const BotanixContractAddresses = {
|
|
@@ -36,11 +36,11 @@ const BotanixContractAddresses = {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
TESTNET: {
|
|
40
40
|
executionContract: "0xBbf7755b674dD107d59F0650D1A3fA9C60bf6Fe6",
|
|
41
41
|
swapContract: "0xf61D1da542111216337FeEA5586022130D468842",
|
|
42
|
-
btcRelayContract: "
|
|
43
|
-
btcRelayDeploymentHeight:
|
|
42
|
+
btcRelayContract: "0xba7E78011909e3501027FBc226a04DCC837a555D",
|
|
43
|
+
btcRelayDeploymentHeight: 3462466,
|
|
44
44
|
spvVaultContract: "0x1120e1Eb3049148AeBEe497331774BfE1f6c174D",
|
|
45
45
|
spvVaultDeploymentHeight: 3425257,
|
|
46
46
|
handlerContracts: {
|
|
@@ -69,7 +69,7 @@ export const BotanixAssets: BotanixAssetsType = {
|
|
|
69
69
|
export type BotanixOptions = {
|
|
70
70
|
rpcUrl: string | JsonRpcApiProvider,
|
|
71
71
|
retryPolicy?: EVMRetryPolicy,
|
|
72
|
-
chainType?: "MAINNET" | "
|
|
72
|
+
chainType?: "MAINNET" | "TESTNET",
|
|
73
73
|
maxLogsBlockRange?: number,
|
|
74
74
|
|
|
75
75
|
swapContract?: string,
|
|
@@ -99,6 +99,9 @@ export function initializeBotanix(
|
|
|
99
99
|
case BitcoinNetwork.MAINNET:
|
|
100
100
|
options.chainType = "MAINNET";
|
|
101
101
|
break;
|
|
102
|
+
case BitcoinNetwork.TESTNET:
|
|
103
|
+
options.chainType = "TESTNET";
|
|
104
|
+
break;
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
@@ -141,7 +141,7 @@ export class EVMTransactions extends EVMModule<any> {
|
|
|
141
141
|
const txIds: string[] = [];
|
|
142
142
|
if(parallel) {
|
|
143
143
|
const promises: Promise<void>[] = [];
|
|
144
|
-
for(let i=0;i<
|
|
144
|
+
for(let i=0;i<txs.length;i++) {
|
|
145
145
|
let tx: {nonce: number, from: string, hash: string};
|
|
146
146
|
if(signer.isBrowserWallet) {
|
|
147
147
|
tx = await signer.account.sendTransaction(txs[i]);
|
|
@@ -156,7 +156,7 @@ export class EVMTransactions extends EVMModule<any> {
|
|
|
156
156
|
}
|
|
157
157
|
if(promises.length>0) await Promise.all(promises);
|
|
158
158
|
} else {
|
|
159
|
-
for(let i=0;i<
|
|
159
|
+
for(let i=0;i<txs.length;i++) {
|
|
160
160
|
let tx: {nonce: number, from: string, hash: string};
|
|
161
161
|
if(signer.isBrowserWallet) {
|
|
162
162
|
tx = await signer.account.sendTransaction(txs[i]);
|