@appliedblockchain/silentdatarollup-hardhat-plugin-fireblocks 1.0.3 → 1.0.5
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/index.js +6 -7
- package/dist/index.mjs +6 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -32,11 +32,7 @@ var import_config2 = require("hardhat/config");
|
|
|
32
32
|
|
|
33
33
|
// src/constants.ts
|
|
34
34
|
var import_silentdatarollup_core = require("@appliedblockchain/silentdatarollup-core");
|
|
35
|
-
var SIGN_RPC_METHODS = [
|
|
36
|
-
...import_silentdatarollup_core.SIGN_RPC_METHODS,
|
|
37
|
-
"eth_call",
|
|
38
|
-
"eth_estimateGas"
|
|
39
|
-
];
|
|
35
|
+
var SIGN_RPC_METHODS = [...import_silentdatarollup_core.SIGN_RPC_METHODS, "eth_call"];
|
|
40
36
|
var DEBUG_NAMESPACE = "silentdata:fireblocks";
|
|
41
37
|
var DEFAULT_MAX_RETRIES = 25;
|
|
42
38
|
var DEFAULT_POLLING_INTERVAL = 2e3;
|
|
@@ -173,11 +169,13 @@ var SilentDataFireblocksSigner = class extends import_plugins.ProviderWrapper {
|
|
|
173
169
|
const headers = {
|
|
174
170
|
[import_silentdatarollup_core2.HEADER_TIMESTAMP]: xTimestamp
|
|
175
171
|
};
|
|
172
|
+
const chainId = await this.getChainId();
|
|
176
173
|
const signatureType = this.config?.authSignatureType ?? import_silentdatarollup_core2.SignatureType.Raw;
|
|
177
174
|
let content;
|
|
178
175
|
switch (signatureType) {
|
|
179
176
|
case import_silentdatarollup_core2.SignatureType.Raw:
|
|
180
177
|
const preparedMessage = this.baseProvider.prepareSignatureMessage(
|
|
178
|
+
chainId.toString(),
|
|
181
179
|
rpcRequest,
|
|
182
180
|
xTimestamp
|
|
183
181
|
);
|
|
@@ -193,12 +191,13 @@ var SilentDataFireblocksSigner = class extends import_plugins.ProviderWrapper {
|
|
|
193
191
|
types: {
|
|
194
192
|
EIP712Domain: [
|
|
195
193
|
{ name: "name", type: "string" },
|
|
196
|
-
{ name: "version", type: "string" }
|
|
194
|
+
{ name: "version", type: "string" },
|
|
195
|
+
{ name: "chainId", type: "uint256" }
|
|
197
196
|
],
|
|
198
197
|
...types
|
|
199
198
|
},
|
|
200
199
|
primaryType: "Call",
|
|
201
|
-
domain: import_silentdatarollup_core2.eip721Domain,
|
|
200
|
+
domain: { ...import_silentdatarollup_core2.eip721Domain, chainId },
|
|
202
201
|
message
|
|
203
202
|
};
|
|
204
203
|
break;
|
package/dist/index.mjs
CHANGED
|
@@ -8,11 +8,7 @@ import { extendEnvironment } from "hardhat/config";
|
|
|
8
8
|
|
|
9
9
|
// src/constants.ts
|
|
10
10
|
import { SIGN_RPC_METHODS as CORE_SIGN_RPC_METHODS } from "@appliedblockchain/silentdatarollup-core";
|
|
11
|
-
var SIGN_RPC_METHODS = [
|
|
12
|
-
...CORE_SIGN_RPC_METHODS,
|
|
13
|
-
"eth_call",
|
|
14
|
-
"eth_estimateGas"
|
|
15
|
-
];
|
|
11
|
+
var SIGN_RPC_METHODS = [...CORE_SIGN_RPC_METHODS, "eth_call"];
|
|
16
12
|
var DEBUG_NAMESPACE = "silentdata:fireblocks";
|
|
17
13
|
var DEFAULT_MAX_RETRIES = 25;
|
|
18
14
|
var DEFAULT_POLLING_INTERVAL = 2e3;
|
|
@@ -160,11 +156,13 @@ var SilentDataFireblocksSigner = class extends ProviderWrapper {
|
|
|
160
156
|
const headers = {
|
|
161
157
|
[HEADER_TIMESTAMP]: xTimestamp
|
|
162
158
|
};
|
|
159
|
+
const chainId = await this.getChainId();
|
|
163
160
|
const signatureType = this.config?.authSignatureType ?? SignatureType.Raw;
|
|
164
161
|
let content;
|
|
165
162
|
switch (signatureType) {
|
|
166
163
|
case SignatureType.Raw:
|
|
167
164
|
const preparedMessage = this.baseProvider.prepareSignatureMessage(
|
|
165
|
+
chainId.toString(),
|
|
168
166
|
rpcRequest,
|
|
169
167
|
xTimestamp
|
|
170
168
|
);
|
|
@@ -180,12 +178,13 @@ var SilentDataFireblocksSigner = class extends ProviderWrapper {
|
|
|
180
178
|
types: {
|
|
181
179
|
EIP712Domain: [
|
|
182
180
|
{ name: "name", type: "string" },
|
|
183
|
-
{ name: "version", type: "string" }
|
|
181
|
+
{ name: "version", type: "string" },
|
|
182
|
+
{ name: "chainId", type: "uint256" }
|
|
184
183
|
],
|
|
185
184
|
...types
|
|
186
185
|
},
|
|
187
186
|
primaryType: "Call",
|
|
188
|
-
domain: eip721Domain,
|
|
187
|
+
domain: { ...eip721Domain, chainId },
|
|
189
188
|
message
|
|
190
189
|
};
|
|
191
190
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appliedblockchain/silentdatarollup-hardhat-plugin-fireblocks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Hardhat plugin for Silent Data [Rollup] with Fireblocks integration",
|
|
5
5
|
"author": "Applied Blockchain",
|
|
6
6
|
"homepage": "https://github.com/appliedblockchain/silent-data-rollup-providers#readme",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
30
|
+
"build": "tsc --noEmit && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
31
31
|
"check-exports": "attw --pack . --profile node16",
|
|
32
32
|
"prepack": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@appliedblockchain/silentdatarollup-core": "1.0.
|
|
35
|
+
"@appliedblockchain/silentdatarollup-core": "1.0.5",
|
|
36
36
|
"@fireblocks/fireblocks-web3-provider": "1.3.8",
|
|
37
37
|
"@fireblocks/hardhat-fireblocks": "1.3.5",
|
|
38
38
|
"debug": "4.3.7",
|