@atomiqlabs/chain-evm 1.0.0-dev.29 → 1.0.0-dev.31

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.
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CitreaSpvVaultContract = void 0;
4
4
  const EVMSpvVaultContract_1 = require("../../evm/spv_swap/EVMSpvVaultContract");
5
5
  const EVMSpvVaultData_1 = require("../../evm/spv_swap/EVMSpvVaultData");
6
- const lib_esm_1 = require("ethers/lib.esm");
7
6
  const ethers_1 = require("ethers");
8
7
  const CitreaFees_1 = require("./CitreaFees");
9
8
  const EVMAddresses_1 = require("../../evm/chain/modules/EVMAddresses");
@@ -42,7 +41,7 @@ class CitreaSpvVaultContract extends EVMSpvVaultContract_1.EVMSpvVaultContract {
42
41
  tokenStateChanges.add(signer + ":" + vault.token1.token.toLowerCase()); //Also needs to pay out to caller
43
42
  }
44
43
  diffSize += this.calculateStateDiff(signer, tokenStateChanges);
45
- if (data == null || (data.executionHash != null && data.executionHash !== lib_esm_1.ZeroHash))
44
+ if (data == null || (data.executionHash != null && data.executionHash !== ethers_1.ZeroHash))
46
45
  diffSize += CitreaSpvVaultContract.StateDiffSize.EXECUTION_SCHEDULE_DIFF_SIZE;
47
46
  const gasFee = await super.getClaimFee(signer, vault, data, feeRate);
48
47
  return gasFee + CitreaFees_1.CitreaFees.getGasFee(0, feeRate, diffSize);
@@ -59,7 +58,7 @@ class CitreaSpvVaultContract extends EVMSpvVaultContract_1.EVMSpvVaultContract {
59
58
  tokenStateChanges.add(signer + ":" + vault.token1.token.toLowerCase());
60
59
  }
61
60
  diffSize += this.calculateStateDiff(signer, tokenStateChanges);
62
- if (data == null || (data.executionHash != null && data.executionHash !== lib_esm_1.ZeroHash))
61
+ if (data == null || (data.executionHash != null && data.executionHash !== ethers_1.ZeroHash))
63
62
  diffSize += CitreaSpvVaultContract.StateDiffSize.EXECUTION_SCHEDULE_DIFF_SIZE;
64
63
  const gasFee = await super.getFrontFee(signer, vault, data, feeRate);
65
64
  return gasFee + CitreaFees_1.CitreaFees.getGasFee(0, feeRate, diffSize);
@@ -17,6 +17,7 @@ import { EVMPreFetchVerification, EVMSwapInit } from "./modules/EVMSwapInit";
17
17
  import { EVMSwapRefund } from "./modules/EVMSwapRefund";
18
18
  import { EVMSwapClaim } from "./modules/EVMSwapClaim";
19
19
  export declare class EVMSwapContract<ChainId extends string = string> extends EVMContractBase<EscrowManager> implements SwapContract<EVMSwapData, EVMTx, never, EVMPreFetchVerification, EVMSigner, ChainId> {
20
+ readonly supportsInitWithoutClaimer = true;
20
21
  readonly chainId: ChainId;
21
22
  readonly claimWithSecretTimeout: number;
22
23
  readonly claimWithTxDataTimeout: number;
@@ -20,6 +20,7 @@ const ESCROW_STATE_REFUNDED = 3;
20
20
  class EVMSwapContract extends EVMContractBase_1.EVMContractBase {
21
21
  constructor(chainInterface, btcRelay, contractAddress, handlerAddresses) {
22
22
  super(chainInterface, contractAddress, EscrowManagerAbi_1.EscrowManagerAbi);
23
+ this.supportsInitWithoutClaimer = true;
23
24
  ////////////////////////
24
25
  //// Timeouts
25
26
  this.claimWithSecretTimeout = 180;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-evm",
3
- "version": "1.0.0-dev.29",
3
+ "version": "1.0.0-dev.31",
4
4
  "description": "EVM specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "author": "adambor",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@atomiqlabs/base": "^10.0.0-dev.2",
26
+ "@atomiqlabs/base": "^10.0.0-dev.7",
27
27
  "@noble/hashes": "^1.8.0",
28
28
  "@scure/btc-signer": "1.6.0",
29
29
  "buffer": "6.0.3"
@@ -1,8 +1,7 @@
1
1
  import {EVMSpvVaultContract} from "../../evm/spv_swap/EVMSpvVaultContract";
2
2
  import {EVMSpvWithdrawalData} from "../../evm/spv_swap/EVMSpvWithdrawalData";
3
3
  import {EVMSpvVaultData} from "../../evm/spv_swap/EVMSpvVaultData";
4
- import {ZeroHash} from "ethers/lib.esm";
5
- import {ZeroAddress} from "ethers";
4
+ import {ZeroAddress, ZeroHash} from "ethers";
6
5
  import {CitreaFees} from "./CitreaFees";
7
6
  import {EVMAddresses} from "../../evm/chain/modules/EVMAddresses";
8
7
 
@@ -42,6 +42,8 @@ export class EVMSwapContract<ChainId extends string = string>
42
42
  ChainId
43
43
  > {
44
44
 
45
+ readonly supportsInitWithoutClaimer = true;
46
+
45
47
  ////////////////////////
46
48
  //// Constants
47
49
  readonly chainId: ChainId;