@atomiqlabs/chain-evm 1.0.0-dev.41 → 1.0.0-dev.43
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 +1 -1
- package/package.json +1 -1
- package/src/chains/botanix/BotanixInitializer.ts +8 -5
- package/src/evm/chain/modules/EVMTransactions.ts +1 -1
|
@@ -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];
|
|
@@ -198,7 +198,7 @@ class EVMTransactions extends EVMModule_1.EVMModule {
|
|
|
198
198
|
this.root.config.safeBlockTag === "latest" ? Promise.resolve(null) : this.provider.getBlock(this.root.config.safeBlockTag).then(res => res.number),
|
|
199
199
|
this.provider.getTransactionReceipt(txId)
|
|
200
200
|
]);
|
|
201
|
-
if (txReceipt == null || (safeBlockNumber != null && txReceipt.blockNumber
|
|
201
|
+
if (txReceipt == null || (safeBlockNumber != null && txReceipt.blockNumber > safeBlockNumber))
|
|
202
202
|
return "pending";
|
|
203
203
|
if (txReceipt.status === 0)
|
|
204
204
|
return "reverted";
|
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
|
|
|
@@ -222,7 +222,7 @@ export class EVMTransactions extends EVMModule<any> {
|
|
|
222
222
|
this.provider.getTransactionReceipt(txId)
|
|
223
223
|
]);
|
|
224
224
|
|
|
225
|
-
if(txReceipt==null || (safeBlockNumber!=null && txReceipt.blockNumber
|
|
225
|
+
if(txReceipt==null || (safeBlockNumber!=null && txReceipt.blockNumber > safeBlockNumber)) return "pending";
|
|
226
226
|
if(txReceipt.status===0) return "reverted";
|
|
227
227
|
return "success";
|
|
228
228
|
}
|