@atomiqlabs/chain-evm 1.0.0-dev.28 → 1.0.0-dev.30
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 !==
|
|
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 !==
|
|
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);
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EVMAddresses = void 0;
|
|
4
4
|
const EVMModule_1 = require("../EVMModule");
|
|
5
5
|
const ethers_1 = require("ethers");
|
|
6
|
-
const lib_esm_1 = require("ethers/lib.esm");
|
|
7
6
|
class EVMAddresses extends EVMModule_1.EVMModule {
|
|
8
7
|
///////////////////
|
|
9
8
|
//// Address utils
|
|
@@ -24,7 +23,7 @@ class EVMAddresses extends EVMModule_1.EVMModule {
|
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
static randomAddress() {
|
|
27
|
-
const wallet =
|
|
26
|
+
const wallet = ethers_1.Wallet.createRandom();
|
|
28
27
|
return wallet.address;
|
|
29
28
|
}
|
|
30
29
|
}
|
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|