@fuel-ts/account 0.0.0-rc-2021-20240424160726 → 0.0.0-rc-2143-20240424161332
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/README.md +1 -1
- package/dist/account.d.ts +5 -6
- package/dist/account.d.ts.map +1 -1
- package/dist/configs.d.ts.map +1 -1
- package/dist/configs.global.js +1 -1
- package/dist/configs.global.js.map +1 -1
- package/dist/configs.js +1 -1
- package/dist/configs.js.map +1 -1
- package/dist/configs.mjs +1 -1
- package/dist/configs.mjs.map +1 -1
- package/dist/index.global.js +583 -863
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +513 -793
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +395 -674
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +2 -10
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +326 -828
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/coin-quantity.d.ts +1 -1
- package/dist/providers/coin-quantity.d.ts.map +1 -1
- package/dist/providers/coin.d.ts +2 -4
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/message.d.ts +1 -7
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +27 -37
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts +2 -2
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +29 -8
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/utils.d.ts +0 -3
- package/dist/providers/transaction-request/utils.d.ts.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +0 -2
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +2 -3
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts +2 -8
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts +4 -2
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +1055 -1551
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +513 -775
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +406 -668
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +16 -16
@@ -280,7 +280,7 @@
|
|
280
280
|
}
|
281
281
|
return num !== null && typeof num === "object" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);
|
282
282
|
};
|
283
|
-
BN2.max = function
|
283
|
+
BN2.max = function max2(left, right) {
|
284
284
|
if (left.cmp(right) > 0)
|
285
285
|
return left;
|
286
286
|
return right;
|
@@ -5104,7 +5104,7 @@
|
|
5104
5104
|
function isBlob(obj) {
|
5105
5105
|
return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
|
5106
5106
|
}
|
5107
|
-
function
|
5107
|
+
function clone(instance) {
|
5108
5108
|
let p1, p2;
|
5109
5109
|
let body = instance.body;
|
5110
5110
|
if (instance.bodyUsed) {
|
@@ -6038,7 +6038,7 @@
|
|
6038
6038
|
* @return Response
|
6039
6039
|
*/
|
6040
6040
|
clone() {
|
6041
|
-
return new Response2(
|
6041
|
+
return new Response2(clone(this), {
|
6042
6042
|
url: this.url,
|
6043
6043
|
status: this.status,
|
6044
6044
|
statusText: this.statusText,
|
@@ -6088,7 +6088,7 @@
|
|
6088
6088
|
if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) {
|
6089
6089
|
throw new TypeError("Request with GET/HEAD method cannot have body");
|
6090
6090
|
}
|
6091
|
-
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ?
|
6091
|
+
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
|
6092
6092
|
Body.call(this, inputBody, {
|
6093
6093
|
timeout: init.timeout || input.timeout || 0,
|
6094
6094
|
size: init.size || input.size || 0
|
@@ -31914,8 +31914,8 @@ spurious results.`);
|
|
31914
31914
|
// ../versions/dist/index.mjs
|
31915
31915
|
function getBuiltinVersions() {
|
31916
31916
|
return {
|
31917
|
-
FORC: "0.
|
31918
|
-
FUEL_CORE: "0.
|
31917
|
+
FORC: "0.49.3",
|
31918
|
+
FUEL_CORE: "0.22.1",
|
31919
31919
|
FUELS: "0.81.0"
|
31920
31920
|
};
|
31921
31921
|
}
|
@@ -32015,7 +32015,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32015
32015
|
ErrorCode2["INVALID_TRANSFER_AMOUNT"] = "invalid-transfer-amount";
|
32016
32016
|
ErrorCode2["GAS_PRICE_TOO_LOW"] = "gas-price-too-low";
|
32017
32017
|
ErrorCode2["GAS_LIMIT_TOO_LOW"] = "gas-limit-too-low";
|
32018
|
-
ErrorCode2["MAX_FEE_TOO_LOW"] = "max-fee-too-low";
|
32019
32018
|
ErrorCode2["TRANSACTION_NOT_FOUND"] = "transaction-not-found";
|
32020
32019
|
ErrorCode2["TRANSACTION_FAILED"] = "transaction-failed";
|
32021
32020
|
ErrorCode2["INVALID_CONFIGURABLE_CONSTANTS"] = "invalid-configurable-constants";
|
@@ -32194,757 +32193,521 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32194
32193
|
__publicField3(DateTime, "TAI64_NULL", "");
|
32195
32194
|
var chainConfig_default = {
|
32196
32195
|
chain_name: "local_testnet",
|
32197
|
-
|
32198
|
-
|
32199
|
-
|
32200
|
-
|
32201
|
-
|
32202
|
-
|
32203
|
-
|
32204
|
-
max_gas_per_tx: 3e7,
|
32205
|
-
max_size: 112640
|
32206
|
-
}
|
32207
|
-
},
|
32208
|
-
predicate_params: {
|
32209
|
-
V1: {
|
32210
|
-
max_predicate_length: 102400,
|
32211
|
-
max_predicate_data_length: 102400,
|
32212
|
-
max_message_data_length: 102400,
|
32213
|
-
max_gas_per_predicate: 3e7
|
32214
|
-
}
|
32215
|
-
},
|
32216
|
-
script_params: {
|
32217
|
-
V1: {
|
32218
|
-
max_script_length: 102400,
|
32219
|
-
max_script_data_length: 102400
|
32220
|
-
}
|
32221
|
-
},
|
32222
|
-
contract_params: {
|
32223
|
-
V1: {
|
32224
|
-
contract_max_size: 102400,
|
32225
|
-
max_storage_slots: 1760
|
32226
|
-
}
|
32227
|
-
},
|
32228
|
-
fee_params: {
|
32229
|
-
V1: {
|
32230
|
-
gas_price_factor: 92,
|
32231
|
-
gas_per_byte: 63
|
32232
|
-
}
|
32233
|
-
},
|
32234
|
-
chain_id: 0,
|
32235
|
-
gas_costs: {
|
32236
|
-
V1: {
|
32237
|
-
add: 2,
|
32238
|
-
addi: 2,
|
32239
|
-
aloc: 1,
|
32240
|
-
and: 2,
|
32241
|
-
andi: 2,
|
32242
|
-
bal: 366,
|
32243
|
-
bhei: 2,
|
32244
|
-
bhsh: 2,
|
32245
|
-
burn: 33949,
|
32246
|
-
cb: 2,
|
32247
|
-
cfei: 2,
|
32248
|
-
cfsi: 2,
|
32249
|
-
div: 2,
|
32250
|
-
divi: 2,
|
32251
|
-
eck1: 3347,
|
32252
|
-
ecr1: 46165,
|
32253
|
-
ed19: 4210,
|
32254
|
-
eq: 2,
|
32255
|
-
exp: 2,
|
32256
|
-
expi: 2,
|
32257
|
-
flag: 1,
|
32258
|
-
gm: 2,
|
32259
|
-
gt: 2,
|
32260
|
-
gtf: 16,
|
32261
|
-
ji: 2,
|
32262
|
-
jmp: 2,
|
32263
|
-
jne: 2,
|
32264
|
-
jnei: 2,
|
32265
|
-
jnzi: 2,
|
32266
|
-
jmpf: 2,
|
32267
|
-
jmpb: 2,
|
32268
|
-
jnzf: 2,
|
32269
|
-
jnzb: 2,
|
32270
|
-
jnef: 2,
|
32271
|
-
jneb: 2,
|
32272
|
-
lb: 2,
|
32273
|
-
log: 754,
|
32274
|
-
lt: 2,
|
32275
|
-
lw: 2,
|
32276
|
-
mint: 35718,
|
32277
|
-
mlog: 2,
|
32278
|
-
mod: 2,
|
32279
|
-
modi: 2,
|
32280
|
-
move: 2,
|
32281
|
-
movi: 2,
|
32282
|
-
mroo: 5,
|
32283
|
-
mul: 2,
|
32284
|
-
muli: 2,
|
32285
|
-
mldv: 4,
|
32286
|
-
noop: 1,
|
32287
|
-
not: 2,
|
32288
|
-
or: 2,
|
32289
|
-
ori: 2,
|
32290
|
-
poph: 3,
|
32291
|
-
popl: 3,
|
32292
|
-
pshh: 4,
|
32293
|
-
pshl: 4,
|
32294
|
-
ret_contract: 733,
|
32295
|
-
rvrt_contract: 722,
|
32296
|
-
sb: 2,
|
32297
|
-
sll: 2,
|
32298
|
-
slli: 2,
|
32299
|
-
srl: 2,
|
32300
|
-
srli: 2,
|
32301
|
-
srw: 253,
|
32302
|
-
sub: 2,
|
32303
|
-
subi: 2,
|
32304
|
-
sw: 2,
|
32305
|
-
sww: 29053,
|
32306
|
-
time: 79,
|
32307
|
-
tr: 46242,
|
32308
|
-
tro: 33251,
|
32309
|
-
wdcm: 3,
|
32310
|
-
wqcm: 3,
|
32311
|
-
wdop: 3,
|
32312
|
-
wqop: 3,
|
32313
|
-
wdml: 3,
|
32314
|
-
wqml: 4,
|
32315
|
-
wddv: 5,
|
32316
|
-
wqdv: 7,
|
32317
|
-
wdmd: 11,
|
32318
|
-
wqmd: 18,
|
32319
|
-
wdam: 9,
|
32320
|
-
wqam: 12,
|
32321
|
-
wdmm: 11,
|
32322
|
-
wqmm: 11,
|
32323
|
-
xor: 2,
|
32324
|
-
xori: 2,
|
32325
|
-
call: {
|
32326
|
-
LightOperation: {
|
32327
|
-
base: 21687,
|
32328
|
-
units_per_gas: 4
|
32329
|
-
}
|
32330
|
-
},
|
32331
|
-
ccp: {
|
32332
|
-
LightOperation: {
|
32333
|
-
base: 59,
|
32334
|
-
units_per_gas: 20
|
32335
|
-
}
|
32336
|
-
},
|
32337
|
-
croo: {
|
32338
|
-
LightOperation: {
|
32339
|
-
base: 1,
|
32340
|
-
units_per_gas: 1
|
32341
|
-
}
|
32342
|
-
},
|
32343
|
-
csiz: {
|
32344
|
-
LightOperation: {
|
32345
|
-
base: 59,
|
32346
|
-
units_per_gas: 195
|
32347
|
-
}
|
32348
|
-
},
|
32349
|
-
k256: {
|
32350
|
-
LightOperation: {
|
32351
|
-
base: 282,
|
32352
|
-
units_per_gas: 3
|
32353
|
-
}
|
32354
|
-
},
|
32355
|
-
ldc: {
|
32356
|
-
LightOperation: {
|
32357
|
-
base: 45,
|
32358
|
-
units_per_gas: 65
|
32359
|
-
}
|
32360
|
-
},
|
32361
|
-
logd: {
|
32362
|
-
LightOperation: {
|
32363
|
-
base: 1134,
|
32364
|
-
units_per_gas: 2
|
32365
|
-
}
|
32366
|
-
},
|
32367
|
-
mcl: {
|
32368
|
-
LightOperation: {
|
32369
|
-
base: 3,
|
32370
|
-
units_per_gas: 523
|
32371
|
-
}
|
32372
|
-
},
|
32373
|
-
mcli: {
|
32374
|
-
LightOperation: {
|
32375
|
-
base: 3,
|
32376
|
-
units_per_gas: 526
|
32377
|
-
}
|
32378
|
-
},
|
32379
|
-
mcp: {
|
32380
|
-
LightOperation: {
|
32381
|
-
base: 3,
|
32382
|
-
units_per_gas: 448
|
32383
|
-
}
|
32384
|
-
},
|
32385
|
-
mcpi: {
|
32386
|
-
LightOperation: {
|
32387
|
-
base: 7,
|
32388
|
-
units_per_gas: 585
|
32389
|
-
}
|
32390
|
-
},
|
32391
|
-
meq: {
|
32392
|
-
LightOperation: {
|
32393
|
-
base: 11,
|
32394
|
-
units_per_gas: 1097
|
32395
|
-
}
|
32396
|
-
},
|
32397
|
-
retd_contract: {
|
32398
|
-
LightOperation: {
|
32399
|
-
base: 1086,
|
32400
|
-
units_per_gas: 2
|
32401
|
-
}
|
32402
|
-
},
|
32403
|
-
s256: {
|
32404
|
-
LightOperation: {
|
32405
|
-
base: 45,
|
32406
|
-
units_per_gas: 3
|
32407
|
-
}
|
32408
|
-
},
|
32409
|
-
scwq: {
|
32410
|
-
HeavyOperation: {
|
32411
|
-
base: 30375,
|
32412
|
-
gas_per_unit: 28628
|
32413
|
-
}
|
32414
|
-
},
|
32415
|
-
smo: {
|
32416
|
-
LightOperation: {
|
32417
|
-
base: 64196,
|
32418
|
-
units_per_gas: 1
|
32419
|
-
}
|
32420
|
-
},
|
32421
|
-
srwq: {
|
32422
|
-
HeavyOperation: {
|
32423
|
-
base: 262,
|
32424
|
-
gas_per_unit: 249
|
32425
|
-
}
|
32426
|
-
},
|
32427
|
-
swwq: {
|
32428
|
-
HeavyOperation: {
|
32429
|
-
base: 28484,
|
32430
|
-
gas_per_unit: 26613
|
32431
|
-
}
|
32432
|
-
},
|
32433
|
-
contract_root: {
|
32434
|
-
LightOperation: {
|
32435
|
-
base: 45,
|
32436
|
-
units_per_gas: 1
|
32437
|
-
}
|
32438
|
-
},
|
32439
|
-
state_root: {
|
32440
|
-
HeavyOperation: {
|
32441
|
-
base: 350,
|
32442
|
-
gas_per_unit: 176
|
32443
|
-
}
|
32444
|
-
},
|
32445
|
-
new_storage_per_byte: 63,
|
32446
|
-
vm_initialization: {
|
32447
|
-
LightOperation: {
|
32448
|
-
base: 1645,
|
32449
|
-
units_per_gas: 14
|
32450
|
-
}
|
32451
|
-
}
|
32452
|
-
}
|
32196
|
+
block_gas_limit: 5e9,
|
32197
|
+
initial_state: {
|
32198
|
+
coins: [
|
32199
|
+
{
|
32200
|
+
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32201
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32202
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32453
32203
|
},
|
32454
|
-
|
32455
|
-
|
32456
|
-
|
32457
|
-
|
32204
|
+
{
|
32205
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32206
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32207
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32208
|
+
},
|
32209
|
+
{
|
32210
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32211
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32212
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32213
|
+
},
|
32214
|
+
{
|
32215
|
+
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32216
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32217
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32218
|
+
},
|
32219
|
+
{
|
32220
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32221
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32222
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32223
|
+
},
|
32224
|
+
{
|
32225
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32226
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32227
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32228
|
+
},
|
32229
|
+
{
|
32230
|
+
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32231
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32232
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32233
|
+
},
|
32234
|
+
{
|
32235
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32236
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32237
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32238
|
+
},
|
32239
|
+
{
|
32240
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32241
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32242
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32243
|
+
},
|
32244
|
+
{
|
32245
|
+
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32246
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32247
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32248
|
+
},
|
32249
|
+
{
|
32250
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32251
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32252
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32253
|
+
},
|
32254
|
+
{
|
32255
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32256
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32257
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32258
|
+
},
|
32259
|
+
{
|
32260
|
+
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32261
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32262
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32263
|
+
},
|
32264
|
+
{
|
32265
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32266
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32267
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32268
|
+
},
|
32269
|
+
{
|
32270
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32271
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32272
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32273
|
+
},
|
32274
|
+
{
|
32275
|
+
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32276
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32277
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32278
|
+
},
|
32279
|
+
{
|
32280
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32281
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32282
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32283
|
+
},
|
32284
|
+
{
|
32285
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32286
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32287
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32288
|
+
},
|
32289
|
+
{
|
32290
|
+
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32291
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32292
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32293
|
+
},
|
32294
|
+
{
|
32295
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32296
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32297
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32298
|
+
},
|
32299
|
+
{
|
32300
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32301
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32302
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32303
|
+
},
|
32304
|
+
{
|
32305
|
+
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32306
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32307
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32308
|
+
},
|
32309
|
+
{
|
32310
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32311
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32312
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32313
|
+
},
|
32314
|
+
{
|
32315
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32316
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32317
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32318
|
+
},
|
32319
|
+
{
|
32320
|
+
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32321
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32322
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32323
|
+
},
|
32324
|
+
{
|
32325
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32326
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32327
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32328
|
+
},
|
32329
|
+
{
|
32330
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32331
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32332
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32333
|
+
},
|
32334
|
+
{
|
32335
|
+
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32336
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32337
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32338
|
+
},
|
32339
|
+
{
|
32340
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32341
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32342
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32343
|
+
},
|
32344
|
+
{
|
32345
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32346
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32347
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32348
|
+
},
|
32349
|
+
{
|
32350
|
+
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32351
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32352
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32353
|
+
},
|
32354
|
+
{
|
32355
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32356
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32357
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32358
|
+
},
|
32359
|
+
{
|
32360
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32361
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32362
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32363
|
+
},
|
32364
|
+
{
|
32365
|
+
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32366
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32367
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32368
|
+
},
|
32369
|
+
{
|
32370
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32371
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32372
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32373
|
+
},
|
32374
|
+
{
|
32375
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32376
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32377
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32378
|
+
},
|
32379
|
+
{
|
32380
|
+
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32381
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32382
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32383
|
+
},
|
32384
|
+
{
|
32385
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32386
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32387
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32388
|
+
},
|
32389
|
+
{
|
32390
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32391
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32392
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32393
|
+
},
|
32394
|
+
{
|
32395
|
+
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32396
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32397
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32398
|
+
},
|
32399
|
+
{
|
32400
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32401
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32402
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32403
|
+
},
|
32404
|
+
{
|
32405
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32406
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32407
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32408
|
+
},
|
32409
|
+
{
|
32410
|
+
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32411
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32412
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32413
|
+
},
|
32414
|
+
{
|
32415
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32416
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32417
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32418
|
+
},
|
32419
|
+
{
|
32420
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32421
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32422
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32423
|
+
},
|
32424
|
+
{
|
32425
|
+
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32426
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32427
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32428
|
+
},
|
32429
|
+
{
|
32430
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32431
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32432
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32433
|
+
},
|
32434
|
+
{
|
32435
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32436
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32437
|
+
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32438
|
+
},
|
32439
|
+
{
|
32440
|
+
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32441
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32442
|
+
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32443
|
+
}
|
32444
|
+
],
|
32445
|
+
messages: [
|
32446
|
+
{
|
32447
|
+
sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32448
|
+
recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32449
|
+
nonce: "0101010101010101010101010101010101010101010101010101010101010101",
|
32450
|
+
amount: "0x000000000000FFFF",
|
32451
|
+
data: "",
|
32452
|
+
da_height: "0x00"
|
32453
|
+
},
|
32454
|
+
{
|
32455
|
+
sender: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32456
|
+
recipient: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32457
|
+
nonce: "0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b0e1ef2963832068b",
|
32458
|
+
amount: "0xb04f3c08f59b309e",
|
32459
|
+
data: "",
|
32460
|
+
da_height: "0x00"
|
32461
|
+
}
|
32462
|
+
]
|
32458
32463
|
},
|
32459
|
-
|
32460
|
-
|
32461
|
-
|
32462
|
-
|
32463
|
-
|
32464
|
-
|
32465
|
-
|
32466
|
-
chain_config: "chainConfig.json",
|
32467
|
-
table_encoding: {
|
32468
|
-
Json: {
|
32469
|
-
filepath: "stateConfig.json"
|
32470
|
-
}
|
32471
|
-
}
|
32472
|
-
};
|
32473
|
-
var stateConfig_default = {
|
32474
|
-
coins: [
|
32475
|
-
{
|
32476
|
-
tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
|
32477
|
-
output_index: 0,
|
32478
|
-
tx_pointer_block_height: 0,
|
32479
|
-
tx_pointer_tx_idx: 0,
|
32480
|
-
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32481
|
-
amount: 18446744073709552e3,
|
32482
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32483
|
-
},
|
32484
|
-
{
|
32485
|
-
tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
|
32486
|
-
output_index: 0,
|
32487
|
-
tx_pointer_block_height: 0,
|
32488
|
-
tx_pointer_tx_idx: 0,
|
32489
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32490
|
-
amount: 18446744073709552e3,
|
32491
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32492
|
-
},
|
32493
|
-
{
|
32494
|
-
tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
|
32495
|
-
output_index: 0,
|
32496
|
-
tx_pointer_block_height: 0,
|
32497
|
-
tx_pointer_tx_idx: 0,
|
32498
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32499
|
-
amount: 18446744073709552e3,
|
32500
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32501
|
-
},
|
32502
|
-
{
|
32503
|
-
tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
|
32504
|
-
output_index: 0,
|
32505
|
-
tx_pointer_block_height: 0,
|
32506
|
-
tx_pointer_tx_idx: 0,
|
32507
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32508
|
-
amount: 18446744073709552e3,
|
32509
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32510
|
-
},
|
32511
|
-
{
|
32512
|
-
tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
|
32513
|
-
output_index: 0,
|
32514
|
-
tx_pointer_block_height: 0,
|
32515
|
-
tx_pointer_tx_idx: 0,
|
32516
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32517
|
-
amount: 18446744073709552e3,
|
32518
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32519
|
-
},
|
32520
|
-
{
|
32521
|
-
tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
|
32522
|
-
output_index: 0,
|
32523
|
-
tx_pointer_block_height: 0,
|
32524
|
-
tx_pointer_tx_idx: 0,
|
32525
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32526
|
-
amount: 18446744073709552e3,
|
32527
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32528
|
-
},
|
32529
|
-
{
|
32530
|
-
tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
|
32531
|
-
output_index: 0,
|
32532
|
-
tx_pointer_block_height: 0,
|
32533
|
-
tx_pointer_tx_idx: 0,
|
32534
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32535
|
-
amount: 18446744073709552e3,
|
32536
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32537
|
-
},
|
32538
|
-
{
|
32539
|
-
tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
|
32540
|
-
output_index: 0,
|
32541
|
-
tx_pointer_block_height: 0,
|
32542
|
-
tx_pointer_tx_idx: 0,
|
32543
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32544
|
-
amount: 18446744073709552e3,
|
32545
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32546
|
-
},
|
32547
|
-
{
|
32548
|
-
tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
|
32549
|
-
output_index: 0,
|
32550
|
-
tx_pointer_block_height: 0,
|
32551
|
-
tx_pointer_tx_idx: 0,
|
32552
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32553
|
-
amount: 18446744073709552e3,
|
32554
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32555
|
-
},
|
32556
|
-
{
|
32557
|
-
tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
|
32558
|
-
output_index: 0,
|
32559
|
-
tx_pointer_block_height: 0,
|
32560
|
-
tx_pointer_tx_idx: 0,
|
32561
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32562
|
-
amount: 18446744073709552e3,
|
32563
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32564
|
-
},
|
32565
|
-
{
|
32566
|
-
tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
|
32567
|
-
output_index: 0,
|
32568
|
-
tx_pointer_block_height: 0,
|
32569
|
-
tx_pointer_tx_idx: 0,
|
32570
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32571
|
-
amount: 18446744073709552e3,
|
32572
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32573
|
-
},
|
32574
|
-
{
|
32575
|
-
tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
|
32576
|
-
output_index: 0,
|
32577
|
-
tx_pointer_block_height: 0,
|
32578
|
-
tx_pointer_tx_idx: 0,
|
32579
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32580
|
-
amount: 18446744073709552e3,
|
32581
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32582
|
-
},
|
32583
|
-
{
|
32584
|
-
tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
|
32585
|
-
output_index: 0,
|
32586
|
-
tx_pointer_block_height: 0,
|
32587
|
-
tx_pointer_tx_idx: 0,
|
32588
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32589
|
-
amount: 18446744073709552e3,
|
32590
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32591
|
-
},
|
32592
|
-
{
|
32593
|
-
tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
|
32594
|
-
output_index: 0,
|
32595
|
-
tx_pointer_block_height: 0,
|
32596
|
-
tx_pointer_tx_idx: 0,
|
32597
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32598
|
-
amount: 18446744073709552e3,
|
32599
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32600
|
-
},
|
32601
|
-
{
|
32602
|
-
tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
|
32603
|
-
output_index: 0,
|
32604
|
-
tx_pointer_block_height: 0,
|
32605
|
-
tx_pointer_tx_idx: 0,
|
32606
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32607
|
-
amount: 18446744073709552e3,
|
32608
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32609
|
-
},
|
32610
|
-
{
|
32611
|
-
tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
|
32612
|
-
output_index: 0,
|
32613
|
-
tx_pointer_block_height: 0,
|
32614
|
-
tx_pointer_tx_idx: 0,
|
32615
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32616
|
-
amount: 18446744073709552e3,
|
32617
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32618
|
-
},
|
32619
|
-
{
|
32620
|
-
tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
|
32621
|
-
output_index: 0,
|
32622
|
-
tx_pointer_block_height: 0,
|
32623
|
-
tx_pointer_tx_idx: 0,
|
32624
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32625
|
-
amount: 18446744073709552e3,
|
32626
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32627
|
-
},
|
32628
|
-
{
|
32629
|
-
tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
|
32630
|
-
output_index: 0,
|
32631
|
-
tx_pointer_block_height: 0,
|
32632
|
-
tx_pointer_tx_idx: 0,
|
32633
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32634
|
-
amount: 18446744073709552e3,
|
32635
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32636
|
-
},
|
32637
|
-
{
|
32638
|
-
tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
|
32639
|
-
output_index: 0,
|
32640
|
-
tx_pointer_block_height: 0,
|
32641
|
-
tx_pointer_tx_idx: 0,
|
32642
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32643
|
-
amount: 18446744073709552e3,
|
32644
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32645
|
-
},
|
32646
|
-
{
|
32647
|
-
tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
|
32648
|
-
output_index: 0,
|
32649
|
-
tx_pointer_block_height: 0,
|
32650
|
-
tx_pointer_tx_idx: 0,
|
32651
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32652
|
-
amount: 18446744073709552e3,
|
32653
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32654
|
-
},
|
32655
|
-
{
|
32656
|
-
tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
|
32657
|
-
output_index: 0,
|
32658
|
-
tx_pointer_block_height: 0,
|
32659
|
-
tx_pointer_tx_idx: 0,
|
32660
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32661
|
-
amount: 18446744073709552e3,
|
32662
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32663
|
-
},
|
32664
|
-
{
|
32665
|
-
tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
|
32666
|
-
output_index: 0,
|
32667
|
-
tx_pointer_block_height: 0,
|
32668
|
-
tx_pointer_tx_idx: 0,
|
32669
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32670
|
-
amount: 18446744073709552e3,
|
32671
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32672
|
-
},
|
32673
|
-
{
|
32674
|
-
tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
|
32675
|
-
output_index: 0,
|
32676
|
-
tx_pointer_block_height: 0,
|
32677
|
-
tx_pointer_tx_idx: 0,
|
32678
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32679
|
-
amount: 18446744073709552e3,
|
32680
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32681
|
-
},
|
32682
|
-
{
|
32683
|
-
tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
|
32684
|
-
output_index: 0,
|
32685
|
-
tx_pointer_block_height: 0,
|
32686
|
-
tx_pointer_tx_idx: 0,
|
32687
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32688
|
-
amount: 18446744073709552e3,
|
32689
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32690
|
-
},
|
32691
|
-
{
|
32692
|
-
tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
|
32693
|
-
output_index: 0,
|
32694
|
-
tx_pointer_block_height: 0,
|
32695
|
-
tx_pointer_tx_idx: 0,
|
32696
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32697
|
-
amount: 18446744073709552e3,
|
32698
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32699
|
-
},
|
32700
|
-
{
|
32701
|
-
tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
|
32702
|
-
output_index: 0,
|
32703
|
-
tx_pointer_block_height: 0,
|
32704
|
-
tx_pointer_tx_idx: 0,
|
32705
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32706
|
-
amount: 18446744073709552e3,
|
32707
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32464
|
+
consensus_parameters: {
|
32465
|
+
tx_params: {
|
32466
|
+
max_inputs: 255,
|
32467
|
+
max_outputs: 255,
|
32468
|
+
max_witnesses: 255,
|
32469
|
+
max_gas_per_tx: 1e7,
|
32470
|
+
max_size: 17825792
|
32708
32471
|
},
|
32709
|
-
{
|
32710
|
-
|
32711
|
-
|
32712
|
-
|
32713
|
-
|
32714
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32715
|
-
amount: 18446744073709552e3,
|
32716
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32472
|
+
predicate_params: {
|
32473
|
+
max_predicate_length: 1048576,
|
32474
|
+
max_predicate_data_length: 1048576,
|
32475
|
+
max_gas_per_predicate: 1e7,
|
32476
|
+
max_message_data_length: 1048576
|
32717
32477
|
},
|
32718
|
-
{
|
32719
|
-
|
32720
|
-
|
32721
|
-
tx_pointer_block_height: 0,
|
32722
|
-
tx_pointer_tx_idx: 0,
|
32723
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32724
|
-
amount: 18446744073709552e3,
|
32725
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32478
|
+
script_params: {
|
32479
|
+
max_script_length: 1048576,
|
32480
|
+
max_script_data_length: 1048576
|
32726
32481
|
},
|
32727
|
-
{
|
32728
|
-
|
32729
|
-
|
32730
|
-
tx_pointer_block_height: 0,
|
32731
|
-
tx_pointer_tx_idx: 0,
|
32732
|
-
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32733
|
-
amount: 18446744073709552e3,
|
32734
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32482
|
+
contract_params: {
|
32483
|
+
contract_max_size: 16777216,
|
32484
|
+
max_storage_slots: 255
|
32735
32485
|
},
|
32736
|
-
{
|
32737
|
-
|
32738
|
-
|
32739
|
-
|
32740
|
-
|
32741
|
-
|
32742
|
-
|
32743
|
-
|
32486
|
+
fee_params: {
|
32487
|
+
gas_price_factor: 92,
|
32488
|
+
gas_per_byte: 4
|
32489
|
+
}
|
32490
|
+
},
|
32491
|
+
gas_costs: {
|
32492
|
+
add: 1,
|
32493
|
+
addi: 1,
|
32494
|
+
aloc: 1,
|
32495
|
+
and: 1,
|
32496
|
+
andi: 1,
|
32497
|
+
bal: 13,
|
32498
|
+
bhei: 1,
|
32499
|
+
bhsh: 1,
|
32500
|
+
burn: 132,
|
32501
|
+
cb: 1,
|
32502
|
+
cfei: 1,
|
32503
|
+
cfsi: 1,
|
32504
|
+
croo: 16,
|
32505
|
+
div: 1,
|
32506
|
+
divi: 1,
|
32507
|
+
ecr1: 3e3,
|
32508
|
+
eck1: 951,
|
32509
|
+
ed19: 3e3,
|
32510
|
+
eq: 1,
|
32511
|
+
exp: 1,
|
32512
|
+
expi: 1,
|
32513
|
+
flag: 1,
|
32514
|
+
gm: 1,
|
32515
|
+
gt: 1,
|
32516
|
+
gtf: 1,
|
32517
|
+
ji: 1,
|
32518
|
+
jmp: 1,
|
32519
|
+
jne: 1,
|
32520
|
+
jnei: 1,
|
32521
|
+
jnzi: 1,
|
32522
|
+
jmpf: 1,
|
32523
|
+
jmpb: 1,
|
32524
|
+
jnzf: 1,
|
32525
|
+
jnzb: 1,
|
32526
|
+
jnef: 1,
|
32527
|
+
jneb: 1,
|
32528
|
+
lb: 1,
|
32529
|
+
log: 9,
|
32530
|
+
lt: 1,
|
32531
|
+
lw: 1,
|
32532
|
+
mint: 135,
|
32533
|
+
mlog: 1,
|
32534
|
+
modOp: 1,
|
32535
|
+
modi: 1,
|
32536
|
+
moveOp: 1,
|
32537
|
+
movi: 1,
|
32538
|
+
mroo: 2,
|
32539
|
+
mul: 1,
|
32540
|
+
muli: 1,
|
32541
|
+
mldv: 1,
|
32542
|
+
noop: 1,
|
32543
|
+
not: 1,
|
32544
|
+
or: 1,
|
32545
|
+
ori: 1,
|
32546
|
+
poph: 2,
|
32547
|
+
popl: 2,
|
32548
|
+
pshh: 2,
|
32549
|
+
pshl: 2,
|
32550
|
+
ret: 13,
|
32551
|
+
rvrt: 13,
|
32552
|
+
sb: 1,
|
32553
|
+
sll: 1,
|
32554
|
+
slli: 1,
|
32555
|
+
srl: 1,
|
32556
|
+
srli: 1,
|
32557
|
+
srw: 12,
|
32558
|
+
sub: 1,
|
32559
|
+
subi: 1,
|
32560
|
+
sw: 1,
|
32561
|
+
sww: 67,
|
32562
|
+
time: 1,
|
32563
|
+
tr: 105,
|
32564
|
+
tro: 60,
|
32565
|
+
wdcm: 1,
|
32566
|
+
wqcm: 1,
|
32567
|
+
wdop: 1,
|
32568
|
+
wqop: 1,
|
32569
|
+
wdml: 1,
|
32570
|
+
wqml: 1,
|
32571
|
+
wddv: 1,
|
32572
|
+
wqdv: 2,
|
32573
|
+
wdmd: 3,
|
32574
|
+
wqmd: 4,
|
32575
|
+
wdam: 2,
|
32576
|
+
wqam: 3,
|
32577
|
+
wdmm: 3,
|
32578
|
+
wqmm: 3,
|
32579
|
+
xor: 1,
|
32580
|
+
xori: 1,
|
32581
|
+
call: {
|
32582
|
+
LightOperation: {
|
32583
|
+
base: 144,
|
32584
|
+
units_per_gas: 214
|
32585
|
+
}
|
32744
32586
|
},
|
32745
|
-
{
|
32746
|
-
|
32747
|
-
|
32748
|
-
|
32749
|
-
|
32750
|
-
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32751
|
-
amount: 18446744073709552e3,
|
32752
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32587
|
+
ccp: {
|
32588
|
+
LightOperation: {
|
32589
|
+
base: 15,
|
32590
|
+
units_per_gas: 103
|
32591
|
+
}
|
32753
32592
|
},
|
32754
|
-
{
|
32755
|
-
|
32756
|
-
|
32757
|
-
|
32758
|
-
|
32759
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32760
|
-
amount: 18446744073709552e3,
|
32761
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32593
|
+
csiz: {
|
32594
|
+
LightOperation: {
|
32595
|
+
base: 17,
|
32596
|
+
units_per_gas: 790
|
32597
|
+
}
|
32762
32598
|
},
|
32763
|
-
{
|
32764
|
-
|
32765
|
-
|
32766
|
-
|
32767
|
-
|
32768
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32769
|
-
amount: 18446744073709552e3,
|
32770
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32599
|
+
k256: {
|
32600
|
+
LightOperation: {
|
32601
|
+
base: 11,
|
32602
|
+
units_per_gas: 214
|
32603
|
+
}
|
32771
32604
|
},
|
32772
|
-
{
|
32773
|
-
|
32774
|
-
|
32775
|
-
|
32776
|
-
|
32777
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32778
|
-
amount: 18446744073709552e3,
|
32779
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32605
|
+
ldc: {
|
32606
|
+
LightOperation: {
|
32607
|
+
base: 15,
|
32608
|
+
units_per_gas: 272
|
32609
|
+
}
|
32780
32610
|
},
|
32781
|
-
{
|
32782
|
-
|
32783
|
-
|
32784
|
-
|
32785
|
-
|
32786
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32787
|
-
amount: 18446744073709552e3,
|
32788
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32611
|
+
logd: {
|
32612
|
+
LightOperation: {
|
32613
|
+
base: 26,
|
32614
|
+
units_per_gas: 64
|
32615
|
+
}
|
32789
32616
|
},
|
32790
|
-
{
|
32791
|
-
|
32792
|
-
|
32793
|
-
|
32794
|
-
|
32795
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32796
|
-
amount: 18446744073709552e3,
|
32797
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32617
|
+
mcl: {
|
32618
|
+
LightOperation: {
|
32619
|
+
base: 1,
|
32620
|
+
units_per_gas: 3333
|
32621
|
+
}
|
32798
32622
|
},
|
32799
|
-
{
|
32800
|
-
|
32801
|
-
|
32802
|
-
|
32803
|
-
|
32804
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32805
|
-
amount: 18446744073709552e3,
|
32806
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32623
|
+
mcli: {
|
32624
|
+
LightOperation: {
|
32625
|
+
base: 1,
|
32626
|
+
units_per_gas: 3333
|
32627
|
+
}
|
32807
32628
|
},
|
32808
|
-
{
|
32809
|
-
|
32810
|
-
|
32811
|
-
|
32812
|
-
|
32813
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32814
|
-
amount: 18446744073709552e3,
|
32815
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32629
|
+
mcp: {
|
32630
|
+
LightOperation: {
|
32631
|
+
base: 1,
|
32632
|
+
units_per_gas: 2e3
|
32633
|
+
}
|
32816
32634
|
},
|
32817
|
-
{
|
32818
|
-
|
32819
|
-
|
32820
|
-
|
32821
|
-
|
32822
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32823
|
-
amount: 18446744073709552e3,
|
32824
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32635
|
+
mcpi: {
|
32636
|
+
LightOperation: {
|
32637
|
+
base: 3,
|
32638
|
+
units_per_gas: 2e3
|
32639
|
+
}
|
32825
32640
|
},
|
32826
|
-
{
|
32827
|
-
|
32828
|
-
|
32829
|
-
|
32830
|
-
|
32831
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32832
|
-
amount: 18446744073709552e3,
|
32833
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32641
|
+
meq: {
|
32642
|
+
LightOperation: {
|
32643
|
+
base: 1,
|
32644
|
+
units_per_gas: 2500
|
32645
|
+
}
|
32834
32646
|
},
|
32835
|
-
{
|
32836
|
-
|
32837
|
-
|
32838
|
-
|
32839
|
-
|
32840
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32841
|
-
amount: 18446744073709552e3,
|
32842
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32647
|
+
retd: {
|
32648
|
+
LightOperation: {
|
32649
|
+
base: 29,
|
32650
|
+
units_per_gas: 62
|
32651
|
+
}
|
32843
32652
|
},
|
32844
|
-
{
|
32845
|
-
|
32846
|
-
|
32847
|
-
|
32848
|
-
|
32849
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32850
|
-
amount: 18446744073709552e3,
|
32851
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32653
|
+
s256: {
|
32654
|
+
LightOperation: {
|
32655
|
+
base: 2,
|
32656
|
+
units_per_gas: 214
|
32657
|
+
}
|
32852
32658
|
},
|
32853
|
-
{
|
32854
|
-
|
32855
|
-
|
32856
|
-
|
32857
|
-
|
32858
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32859
|
-
amount: 18446744073709552e3,
|
32860
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32659
|
+
scwq: {
|
32660
|
+
LightOperation: {
|
32661
|
+
base: 13,
|
32662
|
+
units_per_gas: 5
|
32663
|
+
}
|
32861
32664
|
},
|
32862
|
-
{
|
32863
|
-
|
32864
|
-
|
32865
|
-
|
32866
|
-
|
32867
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32868
|
-
amount: 18446744073709552e3,
|
32869
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32665
|
+
smo: {
|
32666
|
+
LightOperation: {
|
32667
|
+
base: 209,
|
32668
|
+
units_per_gas: 55
|
32669
|
+
}
|
32870
32670
|
},
|
32871
|
-
{
|
32872
|
-
|
32873
|
-
|
32874
|
-
|
32875
|
-
|
32876
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32877
|
-
amount: 18446744073709552e3,
|
32878
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32671
|
+
srwq: {
|
32672
|
+
LightOperation: {
|
32673
|
+
base: 47,
|
32674
|
+
units_per_gas: 5
|
32675
|
+
}
|
32879
32676
|
},
|
32880
|
-
{
|
32881
|
-
|
32882
|
-
|
32883
|
-
|
32884
|
-
|
32885
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32886
|
-
amount: 18446744073709552e3,
|
32887
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32677
|
+
swwq: {
|
32678
|
+
LightOperation: {
|
32679
|
+
base: 44,
|
32680
|
+
units_per_gas: 5
|
32681
|
+
}
|
32888
32682
|
},
|
32889
|
-
{
|
32890
|
-
|
32891
|
-
|
32892
|
-
|
32893
|
-
|
32894
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32895
|
-
amount: 18446744073709552e3,
|
32896
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32683
|
+
contract_root: {
|
32684
|
+
LightOperation: {
|
32685
|
+
base: 75,
|
32686
|
+
units_per_gas: 1
|
32687
|
+
}
|
32897
32688
|
},
|
32898
|
-
{
|
32899
|
-
|
32900
|
-
|
32901
|
-
|
32902
|
-
|
32903
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32904
|
-
amount: 18446744073709552e3,
|
32905
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32689
|
+
state_root: {
|
32690
|
+
LightOperation: {
|
32691
|
+
base: 412,
|
32692
|
+
units_per_gas: 1
|
32693
|
+
}
|
32906
32694
|
},
|
32907
|
-
{
|
32908
|
-
|
32909
|
-
|
32910
|
-
|
32911
|
-
|
32912
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32913
|
-
amount: 18446744073709552e3,
|
32914
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32915
|
-
}
|
32916
|
-
],
|
32917
|
-
messages: [
|
32918
|
-
{
|
32919
|
-
sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32920
|
-
recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32921
|
-
nonce: "0101010101010101010101010101010101010101010101010101010101010101",
|
32922
|
-
amount: 18446744073709552e3,
|
32923
|
-
data: "",
|
32924
|
-
da_height: 0
|
32695
|
+
vm_initialization: {
|
32696
|
+
HeavyOperation: {
|
32697
|
+
base: 2e3,
|
32698
|
+
gas_per_unit: 0
|
32699
|
+
}
|
32925
32700
|
},
|
32926
|
-
|
32927
|
-
|
32928
|
-
|
32929
|
-
|
32930
|
-
|
32931
|
-
data: "",
|
32932
|
-
da_height: 0
|
32701
|
+
new_storage_per_byte: 1
|
32702
|
+
},
|
32703
|
+
consensus: {
|
32704
|
+
PoA: {
|
32705
|
+
signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
|
32933
32706
|
}
|
32934
|
-
|
32935
|
-
contracts: [],
|
32936
|
-
block_height: 0,
|
32937
|
-
da_block_height: 0
|
32938
|
-
};
|
32939
|
-
var defaultChainConfigs = {
|
32940
|
-
chainConfigJson: chainConfig_default,
|
32941
|
-
metadataJson: metadata_default,
|
32942
|
-
stateConfigJson: stateConfig_default
|
32707
|
+
}
|
32943
32708
|
};
|
32709
|
+
var defaultChainConfig = chainConfig_default;
|
32944
32710
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32945
|
-
function isDefined(value) {
|
32946
|
-
return value !== void 0;
|
32947
|
-
}
|
32948
32711
|
|
32949
32712
|
// ../crypto/dist/index.mjs
|
32950
32713
|
var import_crypto8 = __toESM(__require("crypto"), 1);
|
@@ -35215,182 +34978,32 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35215
34978
|
function toBytes3(value, bytesPadding) {
|
35216
34979
|
return bn(value).toBytes(bytesPadding);
|
35217
34980
|
}
|
35218
|
-
|
35219
|
-
|
35220
|
-
function _isPlaceholder(a) {
|
35221
|
-
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
35222
|
-
}
|
35223
|
-
|
35224
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
35225
|
-
function _curry1(fn) {
|
35226
|
-
return function f1(a) {
|
35227
|
-
if (arguments.length === 0 || _isPlaceholder(a)) {
|
35228
|
-
return f1;
|
35229
|
-
} else {
|
35230
|
-
return fn.apply(this, arguments);
|
35231
|
-
}
|
35232
|
-
};
|
35233
|
-
}
|
35234
|
-
|
35235
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
35236
|
-
var isArray_default = Array.isArray || function _isArray(val) {
|
35237
|
-
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
35238
|
-
};
|
35239
|
-
|
35240
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
35241
|
-
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
35242
|
-
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
35243
|
-
});
|
35244
|
-
var type_default = type;
|
35245
|
-
|
35246
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
35247
|
-
var pad = function pad2(n) {
|
35248
|
-
return (n < 10 ? "0" : "") + n;
|
35249
|
-
};
|
35250
|
-
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
35251
|
-
return d.toISOString();
|
35252
|
-
} : function _toISOString3(d) {
|
35253
|
-
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
|
35254
|
-
};
|
35255
|
-
|
35256
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
35257
|
-
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
35258
|
-
return n << 0 === n;
|
35259
|
-
};
|
35260
|
-
|
35261
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
35262
|
-
function _cloneRegExp(pattern) {
|
35263
|
-
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
|
35264
|
-
}
|
35265
|
-
|
35266
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
35267
|
-
function _clone(value, deep, map) {
|
35268
|
-
map || (map = new _ObjectMap());
|
35269
|
-
if (_isPrimitive(value)) {
|
35270
|
-
return value;
|
35271
|
-
}
|
35272
|
-
var copy = function copy2(copiedValue) {
|
35273
|
-
var cachedCopy = map.get(value);
|
35274
|
-
if (cachedCopy) {
|
35275
|
-
return cachedCopy;
|
35276
|
-
}
|
35277
|
-
map.set(value, copiedValue);
|
35278
|
-
for (var key in value) {
|
35279
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
35280
|
-
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
35281
|
-
}
|
35282
|
-
}
|
35283
|
-
return copiedValue;
|
35284
|
-
};
|
35285
|
-
switch (type_default(value)) {
|
35286
|
-
case "Object":
|
35287
|
-
return copy(Object.create(Object.getPrototypeOf(value)));
|
35288
|
-
case "Array":
|
35289
|
-
return copy([]);
|
35290
|
-
case "Date":
|
35291
|
-
return new Date(value.valueOf());
|
35292
|
-
case "RegExp":
|
35293
|
-
return _cloneRegExp(value);
|
35294
|
-
case "Int8Array":
|
35295
|
-
case "Uint8Array":
|
35296
|
-
case "Uint8ClampedArray":
|
35297
|
-
case "Int16Array":
|
35298
|
-
case "Uint16Array":
|
35299
|
-
case "Int32Array":
|
35300
|
-
case "Uint32Array":
|
35301
|
-
case "Float32Array":
|
35302
|
-
case "Float64Array":
|
35303
|
-
case "BigInt64Array":
|
35304
|
-
case "BigUint64Array":
|
35305
|
-
return value.slice();
|
35306
|
-
default:
|
35307
|
-
return value;
|
35308
|
-
}
|
35309
|
-
}
|
35310
|
-
function _isPrimitive(param) {
|
35311
|
-
var type3 = typeof param;
|
35312
|
-
return param == null || type3 != "object" && type3 != "function";
|
34981
|
+
function max(...numbers) {
|
34982
|
+
return numbers.reduce((prev, cur) => bn(cur).gt(prev) ? bn(cur) : prev, bn(0));
|
35313
34983
|
}
|
35314
|
-
var _ObjectMap = /* @__PURE__ */ function() {
|
35315
|
-
function _ObjectMap2() {
|
35316
|
-
this.map = {};
|
35317
|
-
this.length = 0;
|
35318
|
-
}
|
35319
|
-
_ObjectMap2.prototype.set = function(key, value) {
|
35320
|
-
const hashedKey = this.hash(key);
|
35321
|
-
let bucket = this.map[hashedKey];
|
35322
|
-
if (!bucket) {
|
35323
|
-
this.map[hashedKey] = bucket = [];
|
35324
|
-
}
|
35325
|
-
bucket.push([key, value]);
|
35326
|
-
this.length += 1;
|
35327
|
-
};
|
35328
|
-
_ObjectMap2.prototype.hash = function(key) {
|
35329
|
-
let hashedKey = [];
|
35330
|
-
for (var value in key) {
|
35331
|
-
hashedKey.push(Object.prototype.toString.call(key[value]));
|
35332
|
-
}
|
35333
|
-
return hashedKey.join();
|
35334
|
-
};
|
35335
|
-
_ObjectMap2.prototype.get = function(key) {
|
35336
|
-
if (this.length <= 180) {
|
35337
|
-
for (const p in this.map) {
|
35338
|
-
const bucket2 = this.map[p];
|
35339
|
-
for (let i = 0; i < bucket2.length; i += 1) {
|
35340
|
-
const element = bucket2[i];
|
35341
|
-
if (element[0] === key) {
|
35342
|
-
return element[1];
|
35343
|
-
}
|
35344
|
-
}
|
35345
|
-
}
|
35346
|
-
return;
|
35347
|
-
}
|
35348
|
-
const hashedKey = this.hash(key);
|
35349
|
-
const bucket = this.map[hashedKey];
|
35350
|
-
if (!bucket) {
|
35351
|
-
return;
|
35352
|
-
}
|
35353
|
-
for (let i = 0; i < bucket.length; i += 1) {
|
35354
|
-
const element = bucket[i];
|
35355
|
-
if (element[0] === key) {
|
35356
|
-
return element[1];
|
35357
|
-
}
|
35358
|
-
}
|
35359
|
-
};
|
35360
|
-
return _ObjectMap2;
|
35361
|
-
}();
|
35362
|
-
|
35363
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
35364
|
-
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
35365
|
-
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
35366
|
-
});
|
35367
|
-
var clone_default = clone;
|
35368
|
-
|
35369
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
35370
|
-
var hasProtoTrim = typeof String.prototype.trim === "function";
|
35371
34984
|
|
35372
34985
|
// src/providers/coin-quantity.ts
|
35373
34986
|
var coinQuantityfy = (coinQuantityLike) => {
|
35374
34987
|
let assetId;
|
35375
34988
|
let amount;
|
35376
|
-
let
|
34989
|
+
let max2;
|
35377
34990
|
if (Array.isArray(coinQuantityLike)) {
|
35378
34991
|
amount = coinQuantityLike[0];
|
35379
34992
|
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
35380
|
-
|
34993
|
+
max2 = coinQuantityLike[2] ?? void 0;
|
35381
34994
|
} else {
|
35382
34995
|
amount = coinQuantityLike.amount;
|
35383
34996
|
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
35384
|
-
|
34997
|
+
max2 = coinQuantityLike.max ?? void 0;
|
35385
34998
|
}
|
35386
34999
|
const bnAmount = bn(amount);
|
35387
35000
|
return {
|
35388
35001
|
assetId: hexlify(assetId),
|
35389
35002
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
35390
|
-
max:
|
35003
|
+
max: max2 ? bn(max2) : void 0
|
35391
35004
|
};
|
35392
35005
|
};
|
35393
|
-
var
|
35006
|
+
var addAmountToAsset = (params) => {
|
35394
35007
|
const { amount, assetId } = params;
|
35395
35008
|
const coinQuantities = [...params.coinQuantities];
|
35396
35009
|
const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
|
@@ -35457,7 +35070,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35457
35070
|
var ENCODING_V1 = "1";
|
35458
35071
|
var WORD_SIZE = 8;
|
35459
35072
|
var BYTES_32 = 32;
|
35460
|
-
var UTXO_ID_LEN = BYTES_32 +
|
35073
|
+
var UTXO_ID_LEN = BYTES_32 + 1;
|
35461
35074
|
var ASSET_ID_LEN = BYTES_32;
|
35462
35075
|
var ADDRESS_LEN = BYTES_32;
|
35463
35076
|
var NONCE_LEN = BYTES_32;
|
@@ -35465,9 +35078,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35465
35078
|
var TX_POINTER_LEN = WORD_SIZE * 2;
|
35466
35079
|
var MAX_BYTES = 2 ** 32 - 1;
|
35467
35080
|
var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
|
35468
|
-
|
35081
|
+
WORD_SIZE + // Tx size
|
35469
35082
|
// Asset ID/Balance coin input pairs
|
35470
|
-
maxInputs * (ASSET_ID_LEN + WORD_SIZE)
|
35083
|
+
maxInputs * (ASSET_ID_LEN + WORD_SIZE);
|
35471
35084
|
var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
|
35472
35085
|
WORD_SIZE + // Gas limit
|
35473
35086
|
WORD_SIZE + // Script size
|
@@ -35485,6 +35098,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35485
35098
|
ASSET_ID_LEN + // Asset id
|
35486
35099
|
TX_POINTER_LEN + // TxPointer
|
35487
35100
|
WORD_SIZE + // Witnesses index
|
35101
|
+
WORD_SIZE + // Maturity
|
35488
35102
|
WORD_SIZE + // Predicate size
|
35489
35103
|
WORD_SIZE + // Predicate data size
|
35490
35104
|
WORD_SIZE;
|
@@ -35806,7 +35420,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35806
35420
|
constructor(name, coders) {
|
35807
35421
|
const caseIndexCoder = new BigNumberCoder("u64");
|
35808
35422
|
const encodedValueSize = Object.values(coders).reduce(
|
35809
|
-
(
|
35423
|
+
(max2, coder) => Math.max(max2, coder.encodedLength),
|
35810
35424
|
0
|
35811
35425
|
);
|
35812
35426
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36524,7 +36138,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36524
36138
|
constructor(name, coders) {
|
36525
36139
|
const caseIndexCoder = new BigNumberCoder("u64");
|
36526
36140
|
const encodedValueSize = Object.values(coders).reduce(
|
36527
|
-
(
|
36141
|
+
(max2, coder) => Math.max(max2, coder.encodedLength),
|
36528
36142
|
0
|
36529
36143
|
);
|
36530
36144
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -37238,19 +36852,18 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37238
36852
|
encode(value) {
|
37239
36853
|
const parts = [];
|
37240
36854
|
parts.push(new B256Coder().encode(value.txID));
|
37241
|
-
parts.push(new NumberCoder("
|
36855
|
+
parts.push(new NumberCoder("u8").encode(value.outputIndex));
|
37242
36856
|
parts.push(new B256Coder().encode(value.owner));
|
37243
36857
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
37244
36858
|
parts.push(new B256Coder().encode(value.assetId));
|
37245
36859
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
37246
|
-
parts.push(new NumberCoder("
|
36860
|
+
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
36861
|
+
parts.push(new NumberCoder("u32").encode(value.maturity));
|
37247
36862
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
37248
|
-
parts.push(new
|
37249
|
-
parts.push(new
|
37250
|
-
parts.push(new ByteArrayCoder(value.predicateLength
|
37251
|
-
parts.push(
|
37252
|
-
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37253
|
-
);
|
36863
|
+
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
36864
|
+
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
36865
|
+
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36866
|
+
parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
|
37254
36867
|
return concat(parts);
|
37255
36868
|
}
|
37256
36869
|
decode(data, offset) {
|
@@ -37258,7 +36871,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37258
36871
|
let o = offset;
|
37259
36872
|
[decoded, o] = new B256Coder().decode(data, o);
|
37260
36873
|
const txID = decoded;
|
37261
|
-
[decoded, o] = new NumberCoder("
|
36874
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37262
36875
|
const outputIndex = decoded;
|
37263
36876
|
[decoded, o] = new B256Coder().decode(data, o);
|
37264
36877
|
const owner = decoded;
|
@@ -37268,17 +36881,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37268
36881
|
const assetId = decoded;
|
37269
36882
|
[decoded, o] = new TxPointerCoder().decode(data, o);
|
37270
36883
|
const txPointer = decoded;
|
37271
|
-
[decoded, o] = new NumberCoder("
|
36884
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37272
36885
|
const witnessIndex = Number(decoded);
|
36886
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
36887
|
+
const maturity = decoded;
|
37273
36888
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37274
36889
|
const predicateGasUsed = decoded;
|
37275
|
-
[decoded, o] = new
|
36890
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37276
36891
|
const predicateLength = decoded;
|
37277
|
-
[decoded, o] = new
|
36892
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37278
36893
|
const predicateDataLength = decoded;
|
37279
|
-
[decoded, o] = new ByteArrayCoder(predicateLength
|
36894
|
+
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37280
36895
|
const predicate = decoded;
|
37281
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength
|
36896
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37282
36897
|
const predicateData = decoded;
|
37283
36898
|
return [
|
37284
36899
|
{
|
@@ -37290,6 +36905,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37290
36905
|
assetId,
|
37291
36906
|
txPointer,
|
37292
36907
|
witnessIndex,
|
36908
|
+
maturity,
|
37293
36909
|
predicateGasUsed,
|
37294
36910
|
predicateLength,
|
37295
36911
|
predicateDataLength,
|
@@ -37307,7 +36923,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37307
36923
|
encode(value) {
|
37308
36924
|
const parts = [];
|
37309
36925
|
parts.push(new B256Coder().encode(value.txID));
|
37310
|
-
parts.push(new NumberCoder("
|
36926
|
+
parts.push(new NumberCoder("u8").encode(value.outputIndex));
|
37311
36927
|
parts.push(new B256Coder().encode(value.balanceRoot));
|
37312
36928
|
parts.push(new B256Coder().encode(value.stateRoot));
|
37313
36929
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
@@ -37319,7 +36935,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37319
36935
|
let o = offset;
|
37320
36936
|
[decoded, o] = new B256Coder().decode(data, o);
|
37321
36937
|
const txID = decoded;
|
37322
|
-
[decoded, o] = new NumberCoder("
|
36938
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37323
36939
|
const outputIndex = decoded;
|
37324
36940
|
[decoded, o] = new B256Coder().decode(data, o);
|
37325
36941
|
const balanceRoot = decoded;
|
@@ -37368,16 +36984,14 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37368
36984
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
37369
36985
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
37370
36986
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
37371
|
-
parts.push(new NumberCoder("
|
36987
|
+
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
37372
36988
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
37373
|
-
parts.push(new
|
37374
|
-
parts.push(new
|
37375
|
-
parts.push(new
|
36989
|
+
parts.push(new NumberCoder("u32").encode(data.length));
|
36990
|
+
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
36991
|
+
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
37376
36992
|
parts.push(new ByteArrayCoder(data.length).encode(data));
|
37377
|
-
parts.push(new ByteArrayCoder(value.predicateLength
|
37378
|
-
parts.push(
|
37379
|
-
new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData)
|
37380
|
-
);
|
36993
|
+
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36994
|
+
parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
|
37381
36995
|
return concat(parts);
|
37382
36996
|
}
|
37383
36997
|
static decodeData(messageData) {
|
@@ -37397,21 +37011,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37397
37011
|
const amount = decoded;
|
37398
37012
|
[decoded, o] = new B256Coder().decode(data, o);
|
37399
37013
|
const nonce = decoded;
|
37400
|
-
[decoded, o] = new NumberCoder("
|
37014
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37401
37015
|
const witnessIndex = Number(decoded);
|
37402
37016
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37403
37017
|
const predicateGasUsed = decoded;
|
37404
37018
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37405
37019
|
const dataLength2 = decoded;
|
37406
|
-
[decoded, o] = new
|
37020
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37407
37021
|
const predicateLength = decoded;
|
37408
|
-
[decoded, o] = new
|
37022
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37409
37023
|
const predicateDataLength = decoded;
|
37410
37024
|
[decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
|
37411
37025
|
const messageData = decoded;
|
37412
|
-
[decoded, o] = new ByteArrayCoder(predicateLength
|
37026
|
+
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37413
37027
|
const predicate = decoded;
|
37414
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength
|
37028
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37415
37029
|
const predicateData = decoded;
|
37416
37030
|
return [
|
37417
37031
|
{
|
@@ -37723,7 +37337,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37723
37337
|
}
|
37724
37338
|
};
|
37725
37339
|
var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
|
37726
|
-
PolicyType2[PolicyType2["
|
37340
|
+
PolicyType2[PolicyType2["GasPrice"] = 1] = "GasPrice";
|
37727
37341
|
PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
|
37728
37342
|
PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
|
37729
37343
|
PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
|
@@ -37771,9 +37385,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37771
37385
|
let o = offset;
|
37772
37386
|
const policies = [];
|
37773
37387
|
if (policyTypes & 1) {
|
37774
|
-
const [
|
37388
|
+
const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
37775
37389
|
o = nextOffset;
|
37776
|
-
policies.push({ type: 1, data:
|
37390
|
+
policies.push({ type: 1, data: gasPrice });
|
37777
37391
|
}
|
37778
37392
|
if (policyTypes & 2) {
|
37779
37393
|
const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
@@ -38005,15 +37619,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38005
37619
|
encode(value) {
|
38006
37620
|
const parts = [];
|
38007
37621
|
parts.push(new BigNumberCoder("u64").encode(value.scriptGasLimit));
|
38008
|
-
parts.push(new
|
38009
|
-
parts.push(new
|
38010
|
-
parts.push(new BigNumberCoder("u64").encode(value.scriptDataLength));
|
37622
|
+
parts.push(new NumberCoder("u32").encode(value.scriptLength));
|
37623
|
+
parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
|
38011
37624
|
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38012
|
-
parts.push(new NumberCoder("
|
38013
|
-
parts.push(new NumberCoder("
|
38014
|
-
parts.push(new NumberCoder("
|
38015
|
-
parts.push(new
|
38016
|
-
parts.push(new ByteArrayCoder(value.
|
37625
|
+
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37626
|
+
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37627
|
+
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37628
|
+
parts.push(new B256Coder().encode(value.receiptsRoot));
|
37629
|
+
parts.push(new ByteArrayCoder(value.scriptLength).encode(value.script));
|
37630
|
+
parts.push(new ByteArrayCoder(value.scriptDataLength).encode(value.scriptData));
|
38017
37631
|
parts.push(new PoliciesCoder().encode(value.policies));
|
38018
37632
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
38019
37633
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
@@ -38025,23 +37639,23 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38025
37639
|
let o = offset;
|
38026
37640
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38027
37641
|
const scriptGasLimit = decoded;
|
38028
|
-
[decoded, o] = new
|
38029
|
-
const receiptsRoot = decoded;
|
38030
|
-
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37642
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38031
37643
|
const scriptLength = decoded;
|
38032
|
-
[decoded, o] = new
|
37644
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38033
37645
|
const scriptDataLength = decoded;
|
38034
37646
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38035
37647
|
const policyTypes = decoded;
|
38036
|
-
[decoded, o] = new NumberCoder("
|
37648
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38037
37649
|
const inputsCount = decoded;
|
38038
|
-
[decoded, o] = new NumberCoder("
|
37650
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38039
37651
|
const outputsCount = decoded;
|
38040
|
-
[decoded, o] = new NumberCoder("
|
37652
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38041
37653
|
const witnessesCount = decoded;
|
38042
|
-
[decoded, o] = new
|
37654
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
37655
|
+
const receiptsRoot = decoded;
|
37656
|
+
[decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
|
38043
37657
|
const script = decoded;
|
38044
|
-
[decoded, o] = new ByteArrayCoder(scriptDataLength
|
37658
|
+
[decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
|
38045
37659
|
const scriptData = decoded;
|
38046
37660
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
38047
37661
|
const policies = decoded;
|
@@ -38079,19 +37693,18 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38079
37693
|
}
|
38080
37694
|
encode(value) {
|
38081
37695
|
const parts = [];
|
38082
|
-
parts.push(new NumberCoder("
|
38083
|
-
parts.push(new
|
38084
|
-
parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
|
37696
|
+
parts.push(new NumberCoder("u32").encode(value.bytecodeLength));
|
37697
|
+
parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
|
38085
37698
|
parts.push(new NumberCoder("u32").encode(value.policyTypes));
|
38086
|
-
parts.push(new NumberCoder("u16").encode(value.
|
38087
|
-
parts.push(new NumberCoder("
|
38088
|
-
parts.push(new NumberCoder("
|
37699
|
+
parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
|
37700
|
+
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37701
|
+
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37702
|
+
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37703
|
+
parts.push(new B256Coder().encode(value.salt));
|
37704
|
+
parts.push(new PoliciesCoder().encode(value.policies));
|
38089
37705
|
parts.push(
|
38090
|
-
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount
|
38091
|
-
value.storageSlots
|
38092
|
-
)
|
37706
|
+
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(value.storageSlots)
|
38093
37707
|
);
|
38094
|
-
parts.push(new PoliciesCoder().encode(value.policies));
|
38095
37708
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
38096
37709
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
38097
37710
|
parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
|
@@ -38100,27 +37713,26 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38100
37713
|
decode(data, offset) {
|
38101
37714
|
let decoded;
|
38102
37715
|
let o = offset;
|
38103
|
-
[decoded, o] = new NumberCoder("
|
37716
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37717
|
+
const bytecodeLength = decoded;
|
37718
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38104
37719
|
const bytecodeWitnessIndex = decoded;
|
38105
|
-
[decoded, o] = new B256Coder().decode(data, o);
|
38106
|
-
const salt = decoded;
|
38107
|
-
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38108
|
-
const storageSlotsCount = decoded;
|
38109
37720
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38110
37721
|
const policyTypes = decoded;
|
38111
37722
|
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37723
|
+
const storageSlotsCount = decoded;
|
37724
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38112
37725
|
const inputsCount = decoded;
|
38113
|
-
[decoded, o] = new NumberCoder("
|
37726
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38114
37727
|
const outputsCount = decoded;
|
38115
|
-
[decoded, o] = new NumberCoder("
|
37728
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38116
37729
|
const witnessesCount = decoded;
|
38117
|
-
[decoded, o] = new
|
38118
|
-
|
38119
|
-
o
|
38120
|
-
);
|
38121
|
-
const storageSlots = decoded;
|
37730
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
37731
|
+
const salt = decoded;
|
38122
37732
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
38123
37733
|
const policies = decoded;
|
37734
|
+
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
|
37735
|
+
const storageSlots = decoded;
|
38124
37736
|
[decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
|
38125
37737
|
const inputs = decoded;
|
38126
37738
|
[decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
|
@@ -38130,6 +37742,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38130
37742
|
return [
|
38131
37743
|
{
|
38132
37744
|
type: 1,
|
37745
|
+
bytecodeLength,
|
38133
37746
|
bytecodeWitnessIndex,
|
38134
37747
|
policyTypes,
|
38135
37748
|
storageSlotsCount,
|
@@ -38158,7 +37771,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38158
37771
|
parts.push(new OutputContractCoder().encode(value.outputContract));
|
38159
37772
|
parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
|
38160
37773
|
parts.push(new B256Coder().encode(value.mintAssetId));
|
38161
|
-
parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
|
38162
37774
|
return concat(parts);
|
38163
37775
|
}
|
38164
37776
|
decode(data, offset) {
|
@@ -38174,8 +37786,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38174
37786
|
const mintAmount = decoded;
|
38175
37787
|
[decoded, o] = new B256Coder().decode(data, o);
|
38176
37788
|
const mintAssetId = decoded;
|
38177
|
-
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38178
|
-
const gasPrice = decoded;
|
38179
37789
|
return [
|
38180
37790
|
{
|
38181
37791
|
type: 2,
|
@@ -38183,8 +37793,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38183
37793
|
inputContract,
|
38184
37794
|
outputContract,
|
38185
37795
|
mintAmount,
|
38186
|
-
mintAssetId
|
38187
|
-
gasPrice
|
37796
|
+
mintAssetId
|
38188
37797
|
},
|
38189
37798
|
o
|
38190
37799
|
];
|
@@ -38491,6 +38100,159 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38491
38100
|
// src/providers/provider.ts
|
38492
38101
|
var import_graphql_request = __toESM(require_dist2());
|
38493
38102
|
|
38103
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
38104
|
+
function _isPlaceholder(a) {
|
38105
|
+
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
38106
|
+
}
|
38107
|
+
|
38108
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
38109
|
+
function _curry1(fn) {
|
38110
|
+
return function f1(a) {
|
38111
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
38112
|
+
return f1;
|
38113
|
+
} else {
|
38114
|
+
return fn.apply(this, arguments);
|
38115
|
+
}
|
38116
|
+
};
|
38117
|
+
}
|
38118
|
+
|
38119
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
38120
|
+
var isArray_default = Array.isArray || function _isArray(val) {
|
38121
|
+
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
38122
|
+
};
|
38123
|
+
|
38124
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
38125
|
+
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
38126
|
+
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
38127
|
+
});
|
38128
|
+
var type_default = type;
|
38129
|
+
|
38130
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
38131
|
+
var pad = function pad2(n) {
|
38132
|
+
return (n < 10 ? "0" : "") + n;
|
38133
|
+
};
|
38134
|
+
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
38135
|
+
return d.toISOString();
|
38136
|
+
} : function _toISOString3(d) {
|
38137
|
+
return d.getUTCFullYear() + "-" + pad(d.getUTCMonth() + 1) + "-" + pad(d.getUTCDate()) + "T" + pad(d.getUTCHours()) + ":" + pad(d.getUTCMinutes()) + ":" + pad(d.getUTCSeconds()) + "." + (d.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z";
|
38138
|
+
};
|
38139
|
+
|
38140
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
38141
|
+
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
38142
|
+
return n << 0 === n;
|
38143
|
+
};
|
38144
|
+
|
38145
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
38146
|
+
function _cloneRegExp(pattern) {
|
38147
|
+
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "") + (pattern.dotAll ? "s" : ""));
|
38148
|
+
}
|
38149
|
+
|
38150
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
38151
|
+
function _clone(value, deep, map) {
|
38152
|
+
map || (map = new _ObjectMap());
|
38153
|
+
if (_isPrimitive(value)) {
|
38154
|
+
return value;
|
38155
|
+
}
|
38156
|
+
var copy = function copy2(copiedValue) {
|
38157
|
+
var cachedCopy = map.get(value);
|
38158
|
+
if (cachedCopy) {
|
38159
|
+
return cachedCopy;
|
38160
|
+
}
|
38161
|
+
map.set(value, copiedValue);
|
38162
|
+
for (var key in value) {
|
38163
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
38164
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
38165
|
+
}
|
38166
|
+
}
|
38167
|
+
return copiedValue;
|
38168
|
+
};
|
38169
|
+
switch (type_default(value)) {
|
38170
|
+
case "Object":
|
38171
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
38172
|
+
case "Array":
|
38173
|
+
return copy([]);
|
38174
|
+
case "Date":
|
38175
|
+
return new Date(value.valueOf());
|
38176
|
+
case "RegExp":
|
38177
|
+
return _cloneRegExp(value);
|
38178
|
+
case "Int8Array":
|
38179
|
+
case "Uint8Array":
|
38180
|
+
case "Uint8ClampedArray":
|
38181
|
+
case "Int16Array":
|
38182
|
+
case "Uint16Array":
|
38183
|
+
case "Int32Array":
|
38184
|
+
case "Uint32Array":
|
38185
|
+
case "Float32Array":
|
38186
|
+
case "Float64Array":
|
38187
|
+
case "BigInt64Array":
|
38188
|
+
case "BigUint64Array":
|
38189
|
+
return value.slice();
|
38190
|
+
default:
|
38191
|
+
return value;
|
38192
|
+
}
|
38193
|
+
}
|
38194
|
+
function _isPrimitive(param) {
|
38195
|
+
var type3 = typeof param;
|
38196
|
+
return param == null || type3 != "object" && type3 != "function";
|
38197
|
+
}
|
38198
|
+
var _ObjectMap = /* @__PURE__ */ function() {
|
38199
|
+
function _ObjectMap2() {
|
38200
|
+
this.map = {};
|
38201
|
+
this.length = 0;
|
38202
|
+
}
|
38203
|
+
_ObjectMap2.prototype.set = function(key, value) {
|
38204
|
+
const hashedKey = this.hash(key);
|
38205
|
+
let bucket = this.map[hashedKey];
|
38206
|
+
if (!bucket) {
|
38207
|
+
this.map[hashedKey] = bucket = [];
|
38208
|
+
}
|
38209
|
+
bucket.push([key, value]);
|
38210
|
+
this.length += 1;
|
38211
|
+
};
|
38212
|
+
_ObjectMap2.prototype.hash = function(key) {
|
38213
|
+
let hashedKey = [];
|
38214
|
+
for (var value in key) {
|
38215
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
38216
|
+
}
|
38217
|
+
return hashedKey.join();
|
38218
|
+
};
|
38219
|
+
_ObjectMap2.prototype.get = function(key) {
|
38220
|
+
if (this.length <= 180) {
|
38221
|
+
for (const p in this.map) {
|
38222
|
+
const bucket2 = this.map[p];
|
38223
|
+
for (let i = 0; i < bucket2.length; i += 1) {
|
38224
|
+
const element = bucket2[i];
|
38225
|
+
if (element[0] === key) {
|
38226
|
+
return element[1];
|
38227
|
+
}
|
38228
|
+
}
|
38229
|
+
}
|
38230
|
+
return;
|
38231
|
+
}
|
38232
|
+
const hashedKey = this.hash(key);
|
38233
|
+
const bucket = this.map[hashedKey];
|
38234
|
+
if (!bucket) {
|
38235
|
+
return;
|
38236
|
+
}
|
38237
|
+
for (let i = 0; i < bucket.length; i += 1) {
|
38238
|
+
const element = bucket[i];
|
38239
|
+
if (element[0] === key) {
|
38240
|
+
return element[1];
|
38241
|
+
}
|
38242
|
+
}
|
38243
|
+
};
|
38244
|
+
return _ObjectMap2;
|
38245
|
+
}();
|
38246
|
+
|
38247
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
38248
|
+
var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
|
38249
|
+
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
38250
|
+
});
|
38251
|
+
var clone_default = clone2;
|
38252
|
+
|
38253
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
38254
|
+
var hasProtoTrim = typeof String.prototype.trim === "function";
|
38255
|
+
|
38494
38256
|
// ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
|
38495
38257
|
var __assign = function() {
|
38496
38258
|
__assign = Object.assign || function __assign2(t) {
|
@@ -41656,40 +41418,16 @@ spurious results.`);
|
|
41656
41418
|
var lib_default2 = gql;
|
41657
41419
|
|
41658
41420
|
// src/providers/__generated__/operations.ts
|
41659
|
-
var TransactionStatusSubscriptionFragmentFragmentDoc = lib_default2`
|
41660
|
-
fragment transactionStatusSubscriptionFragment on TransactionStatus {
|
41661
|
-
type: __typename
|
41662
|
-
... on SubmittedStatus {
|
41663
|
-
time
|
41664
|
-
}
|
41665
|
-
... on SuccessStatus {
|
41666
|
-
block {
|
41667
|
-
id
|
41668
|
-
}
|
41669
|
-
time
|
41670
|
-
programState {
|
41671
|
-
returnType
|
41672
|
-
data
|
41673
|
-
}
|
41674
|
-
}
|
41675
|
-
... on FailureStatus {
|
41676
|
-
block {
|
41677
|
-
id
|
41678
|
-
}
|
41679
|
-
time
|
41680
|
-
reason
|
41681
|
-
}
|
41682
|
-
... on SqueezedOutStatus {
|
41683
|
-
reason
|
41684
|
-
}
|
41685
|
-
}
|
41686
|
-
`;
|
41687
41421
|
var ReceiptFragmentFragmentDoc = lib_default2`
|
41688
41422
|
fragment receiptFragment on Receipt {
|
41689
|
-
|
41423
|
+
contract {
|
41424
|
+
id
|
41425
|
+
}
|
41690
41426
|
pc
|
41691
41427
|
is
|
41692
|
-
to
|
41428
|
+
to {
|
41429
|
+
id
|
41430
|
+
}
|
41693
41431
|
toAddress
|
41694
41432
|
amount
|
41695
41433
|
assetId
|
@@ -41727,16 +41465,10 @@ spurious results.`);
|
|
41727
41465
|
id
|
41728
41466
|
}
|
41729
41467
|
time
|
41730
|
-
receipts {
|
41731
|
-
...receiptFragment
|
41732
|
-
}
|
41733
41468
|
programState {
|
41734
41469
|
returnType
|
41735
41470
|
data
|
41736
41471
|
}
|
41737
|
-
receipts {
|
41738
|
-
...receiptFragment
|
41739
|
-
}
|
41740
41472
|
}
|
41741
41473
|
... on FailureStatus {
|
41742
41474
|
block {
|
@@ -41744,24 +41476,26 @@ spurious results.`);
|
|
41744
41476
|
}
|
41745
41477
|
time
|
41746
41478
|
reason
|
41747
|
-
receipts {
|
41748
|
-
...receiptFragment
|
41749
|
-
}
|
41750
41479
|
}
|
41751
41480
|
... on SqueezedOutStatus {
|
41752
41481
|
reason
|
41753
41482
|
}
|
41754
41483
|
}
|
41755
|
-
|
41484
|
+
`;
|
41756
41485
|
var TransactionFragmentFragmentDoc = lib_default2`
|
41757
41486
|
fragment transactionFragment on Transaction {
|
41758
41487
|
id
|
41759
41488
|
rawPayload
|
41489
|
+
gasPrice
|
41490
|
+
receipts {
|
41491
|
+
...receiptFragment
|
41492
|
+
}
|
41760
41493
|
status {
|
41761
41494
|
...transactionStatusFragment
|
41762
41495
|
}
|
41763
41496
|
}
|
41764
|
-
${
|
41497
|
+
${ReceiptFragmentFragmentDoc}
|
41498
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
41765
41499
|
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41766
41500
|
fragment inputEstimatePredicatesFragment on Input {
|
41767
41501
|
... on InputCoin {
|
@@ -41779,46 +41513,6 @@ spurious results.`);
|
|
41779
41513
|
}
|
41780
41514
|
}
|
41781
41515
|
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
41782
|
-
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
41783
|
-
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
41784
|
-
reason
|
41785
|
-
programState {
|
41786
|
-
returnType
|
41787
|
-
data
|
41788
|
-
}
|
41789
|
-
}
|
41790
|
-
`;
|
41791
|
-
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
41792
|
-
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
41793
|
-
programState {
|
41794
|
-
returnType
|
41795
|
-
data
|
41796
|
-
}
|
41797
|
-
}
|
41798
|
-
`;
|
41799
|
-
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
41800
|
-
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
41801
|
-
... on DryRunFailureStatus {
|
41802
|
-
...dryRunFailureStatusFragment
|
41803
|
-
}
|
41804
|
-
... on DryRunSuccessStatus {
|
41805
|
-
...dryRunSuccessStatusFragment
|
41806
|
-
}
|
41807
|
-
}
|
41808
|
-
${DryRunFailureStatusFragmentFragmentDoc}
|
41809
|
-
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
41810
|
-
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
41811
|
-
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
41812
|
-
id
|
41813
|
-
status {
|
41814
|
-
...dryRunTransactionStatusFragment
|
41815
|
-
}
|
41816
|
-
receipts {
|
41817
|
-
...receiptFragment
|
41818
|
-
}
|
41819
|
-
}
|
41820
|
-
${DryRunTransactionStatusFragmentFragmentDoc}
|
41821
|
-
${ReceiptFragmentFragmentDoc}`;
|
41822
41516
|
var CoinFragmentFragmentDoc = lib_default2`
|
41823
41517
|
fragment coinFragment on Coin {
|
41824
41518
|
__typename
|
@@ -41826,6 +41520,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41826
41520
|
owner
|
41827
41521
|
amount
|
41828
41522
|
assetId
|
41523
|
+
maturity
|
41829
41524
|
blockCreated
|
41830
41525
|
txCreatedIdx
|
41831
41526
|
}
|
@@ -41864,32 +41559,26 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41864
41559
|
messageBlockHeader {
|
41865
41560
|
id
|
41866
41561
|
daHeight
|
41867
|
-
consensusParametersVersion
|
41868
|
-
stateTransitionBytecodeVersion
|
41869
41562
|
transactionsCount
|
41870
|
-
messageReceiptCount
|
41871
41563
|
transactionsRoot
|
41872
|
-
messageOutboxRoot
|
41873
|
-
eventInboxRoot
|
41874
41564
|
height
|
41875
41565
|
prevRoot
|
41876
41566
|
time
|
41877
41567
|
applicationHash
|
41568
|
+
messageReceiptRoot
|
41569
|
+
messageReceiptCount
|
41878
41570
|
}
|
41879
41571
|
commitBlockHeader {
|
41880
41572
|
id
|
41881
41573
|
daHeight
|
41882
|
-
consensusParametersVersion
|
41883
|
-
stateTransitionBytecodeVersion
|
41884
41574
|
transactionsCount
|
41885
|
-
messageReceiptCount
|
41886
41575
|
transactionsRoot
|
41887
|
-
messageOutboxRoot
|
41888
|
-
eventInboxRoot
|
41889
41576
|
height
|
41890
41577
|
prevRoot
|
41891
41578
|
time
|
41892
41579
|
applicationHash
|
41580
|
+
messageReceiptRoot
|
41581
|
+
messageReceiptCount
|
41893
41582
|
}
|
41894
41583
|
sender
|
41895
41584
|
recipient
|
@@ -41908,8 +41597,8 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41908
41597
|
var BlockFragmentFragmentDoc = lib_default2`
|
41909
41598
|
fragment blockFragment on Block {
|
41910
41599
|
id
|
41911
|
-
height
|
41912
41600
|
header {
|
41601
|
+
height
|
41913
41602
|
time
|
41914
41603
|
}
|
41915
41604
|
transactions {
|
@@ -41919,7 +41608,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41919
41608
|
`;
|
41920
41609
|
var TxParametersFragmentFragmentDoc = lib_default2`
|
41921
41610
|
fragment TxParametersFragment on TxParameters {
|
41922
|
-
version
|
41923
41611
|
maxInputs
|
41924
41612
|
maxOutputs
|
41925
41613
|
maxWitnesses
|
@@ -41929,7 +41617,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41929
41617
|
`;
|
41930
41618
|
var PredicateParametersFragmentFragmentDoc = lib_default2`
|
41931
41619
|
fragment PredicateParametersFragment on PredicateParameters {
|
41932
|
-
version
|
41933
41620
|
maxPredicateLength
|
41934
41621
|
maxPredicateDataLength
|
41935
41622
|
maxGasPerPredicate
|
@@ -41938,21 +41625,18 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41938
41625
|
`;
|
41939
41626
|
var ScriptParametersFragmentFragmentDoc = lib_default2`
|
41940
41627
|
fragment ScriptParametersFragment on ScriptParameters {
|
41941
|
-
version
|
41942
41628
|
maxScriptLength
|
41943
41629
|
maxScriptDataLength
|
41944
41630
|
}
|
41945
41631
|
`;
|
41946
41632
|
var ContractParametersFragmentFragmentDoc = lib_default2`
|
41947
41633
|
fragment ContractParametersFragment on ContractParameters {
|
41948
|
-
version
|
41949
41634
|
contractMaxSize
|
41950
41635
|
maxStorageSlots
|
41951
41636
|
}
|
41952
41637
|
`;
|
41953
41638
|
var FeeParametersFragmentFragmentDoc = lib_default2`
|
41954
41639
|
fragment FeeParametersFragment on FeeParameters {
|
41955
|
-
version
|
41956
41640
|
gasPriceFactor
|
41957
41641
|
gasPerByte
|
41958
41642
|
}
|
@@ -41972,7 +41656,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41972
41656
|
`;
|
41973
41657
|
var GasCostsFragmentFragmentDoc = lib_default2`
|
41974
41658
|
fragment GasCostsFragment on GasCosts {
|
41975
|
-
version
|
41976
41659
|
add
|
41977
41660
|
addi
|
41978
41661
|
aloc
|
@@ -41985,6 +41668,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41985
41668
|
cb
|
41986
41669
|
cfei
|
41987
41670
|
cfsi
|
41671
|
+
croo
|
41988
41672
|
div
|
41989
41673
|
divi
|
41990
41674
|
ecr1
|
@@ -42067,9 +41751,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
42067
41751
|
ccp {
|
42068
41752
|
...DependentCostFragment
|
42069
41753
|
}
|
42070
|
-
croo {
|
42071
|
-
...DependentCostFragment
|
42072
|
-
}
|
42073
41754
|
csiz {
|
42074
41755
|
...DependentCostFragment
|
42075
41756
|
}
|
@@ -42129,7 +41810,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
42129
41810
|
${DependentCostFragmentFragmentDoc}`;
|
42130
41811
|
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
42131
41812
|
fragment consensusParametersFragment on ConsensusParameters {
|
42132
|
-
version
|
42133
41813
|
txParams {
|
42134
41814
|
...TxParametersFragment
|
42135
41815
|
}
|
@@ -42189,9 +41869,18 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
42189
41869
|
fragment nodeInfoFragment on NodeInfo {
|
42190
41870
|
utxoValidation
|
42191
41871
|
vmBacktrace
|
41872
|
+
minGasPrice
|
42192
41873
|
maxTx
|
42193
41874
|
maxDepth
|
42194
41875
|
nodeVersion
|
41876
|
+
peers {
|
41877
|
+
id
|
41878
|
+
addresses
|
41879
|
+
clientVersion
|
41880
|
+
blockHeight
|
41881
|
+
lastHeartbeatMs
|
41882
|
+
appScore
|
41883
|
+
}
|
42195
41884
|
}
|
42196
41885
|
`;
|
42197
41886
|
var GetVersionDocument = lib_default2`
|
@@ -42226,9 +41915,13 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
42226
41915
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
42227
41916
|
transaction(id: $transactionId) {
|
42228
41917
|
...transactionFragment
|
41918
|
+
receipts {
|
41919
|
+
...receiptFragment
|
41920
|
+
}
|
42229
41921
|
}
|
42230
41922
|
}
|
42231
|
-
${TransactionFragmentFragmentDoc}
|
41923
|
+
${TransactionFragmentFragmentDoc}
|
41924
|
+
${ReceiptFragmentFragmentDoc}`;
|
42232
41925
|
var GetTransactionsDocument = lib_default2`
|
42233
41926
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
42234
41927
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42356,20 +42049,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42356
42049
|
}
|
42357
42050
|
}
|
42358
42051
|
${BalanceFragmentFragmentDoc}`;
|
42359
|
-
var GetLatestGasPriceDocument = lib_default2`
|
42360
|
-
query getLatestGasPrice {
|
42361
|
-
latestGasPrice {
|
42362
|
-
gasPrice
|
42363
|
-
}
|
42364
|
-
}
|
42365
|
-
`;
|
42366
|
-
var EstimateGasPriceDocument = lib_default2`
|
42367
|
-
query estimateGasPrice($blockHorizon: U32!) {
|
42368
|
-
estimateGasPrice(blockHorizon: $blockHorizon) {
|
42369
|
-
gasPrice
|
42370
|
-
}
|
42371
|
-
}
|
42372
|
-
`;
|
42373
42052
|
var GetBalancesDocument = lib_default2`
|
42374
42053
|
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42375
42054
|
balances(
|
@@ -42424,12 +42103,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42424
42103
|
}
|
42425
42104
|
`;
|
42426
42105
|
var DryRunDocument = lib_default2`
|
42427
|
-
mutation dryRun($
|
42428
|
-
dryRun(
|
42429
|
-
...
|
42106
|
+
mutation dryRun($encodedTransaction: HexString!, $utxoValidation: Boolean) {
|
42107
|
+
dryRun(tx: $encodedTransaction, utxoValidation: $utxoValidation) {
|
42108
|
+
...receiptFragment
|
42430
42109
|
}
|
42431
42110
|
}
|
42432
|
-
${
|
42111
|
+
${ReceiptFragmentFragmentDoc}`;
|
42433
42112
|
var SubmitDocument = lib_default2`
|
42434
42113
|
mutation submit($encodedTransaction: HexString!) {
|
42435
42114
|
submit(tx: $encodedTransaction) {
|
@@ -42448,17 +42127,17 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42448
42127
|
var SubmitAndAwaitDocument = lib_default2`
|
42449
42128
|
subscription submitAndAwait($encodedTransaction: HexString!) {
|
42450
42129
|
submitAndAwait(tx: $encodedTransaction) {
|
42451
|
-
...
|
42130
|
+
...transactionStatusFragment
|
42452
42131
|
}
|
42453
42132
|
}
|
42454
|
-
${
|
42133
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
42455
42134
|
var StatusChangeDocument = lib_default2`
|
42456
42135
|
subscription statusChange($transactionId: TransactionId!) {
|
42457
42136
|
statusChange(id: $transactionId) {
|
42458
|
-
...
|
42137
|
+
...transactionStatusFragment
|
42459
42138
|
}
|
42460
42139
|
}
|
42461
|
-
${
|
42140
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
42462
42141
|
function getSdk(requester) {
|
42463
42142
|
return {
|
42464
42143
|
getVersion(variables, options) {
|
@@ -42512,12 +42191,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42512
42191
|
getBalance(variables, options) {
|
42513
42192
|
return requester(GetBalanceDocument, variables, options);
|
42514
42193
|
},
|
42515
|
-
getLatestGasPrice(variables, options) {
|
42516
|
-
return requester(GetLatestGasPriceDocument, variables, options);
|
42517
|
-
},
|
42518
|
-
estimateGasPrice(variables, options) {
|
42519
|
-
return requester(EstimateGasPriceDocument, variables, options);
|
42520
|
-
},
|
42521
42194
|
getBalances(variables, options) {
|
42522
42195
|
return requester(GetBalancesDocument, variables, options);
|
42523
42196
|
},
|
@@ -42701,9 +42374,10 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42701
42374
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42702
42375
|
},
|
42703
42376
|
witnessIndex: value.witnessIndex,
|
42377
|
+
maturity: value.maturity ?? 0,
|
42704
42378
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42705
|
-
predicateLength:
|
42706
|
-
predicateDataLength:
|
42379
|
+
predicateLength: predicate.length,
|
42380
|
+
predicateDataLength: predicateData.length,
|
42707
42381
|
predicate: hexlify(predicate),
|
42708
42382
|
predicateData: hexlify(predicateData)
|
42709
42383
|
};
|
@@ -42734,8 +42408,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42734
42408
|
nonce: hexlify(value.nonce),
|
42735
42409
|
witnessIndex: value.witnessIndex,
|
42736
42410
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42737
|
-
predicateLength:
|
42738
|
-
predicateDataLength:
|
42411
|
+
predicateLength: predicate.length,
|
42412
|
+
predicateDataLength: predicateData.length,
|
42739
42413
|
predicate: hexlify(predicate),
|
42740
42414
|
predicateData: hexlify(predicateData),
|
42741
42415
|
data: hexlify(data),
|
@@ -42892,8 +42566,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42892
42566
|
case "CALL" /* Call */: {
|
42893
42567
|
const callReceipt = {
|
42894
42568
|
type: ReceiptType.Call,
|
42895
|
-
from: hexOrZero(receipt.id
|
42896
|
-
to: hexOrZero(receipt?.to),
|
42569
|
+
from: hexOrZero(receipt.contract?.id),
|
42570
|
+
to: hexOrZero(receipt?.to?.id),
|
42897
42571
|
amount: bn(receipt.amount),
|
42898
42572
|
assetId: hexOrZero(receipt.assetId),
|
42899
42573
|
gas: bn(receipt.gas),
|
@@ -42907,7 +42581,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42907
42581
|
case "RETURN" /* Return */: {
|
42908
42582
|
const returnReceipt = {
|
42909
42583
|
type: ReceiptType.Return,
|
42910
|
-
id: hexOrZero(receipt.id
|
42584
|
+
id: hexOrZero(receipt.contract?.id),
|
42911
42585
|
val: bn(receipt.val),
|
42912
42586
|
pc: bn(receipt.pc),
|
42913
42587
|
is: bn(receipt.is)
|
@@ -42917,7 +42591,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42917
42591
|
case "RETURN_DATA" /* ReturnData */: {
|
42918
42592
|
const returnDataReceipt = {
|
42919
42593
|
type: ReceiptType.ReturnData,
|
42920
|
-
id: hexOrZero(receipt.id
|
42594
|
+
id: hexOrZero(receipt.contract?.id),
|
42921
42595
|
ptr: bn(receipt.ptr),
|
42922
42596
|
len: bn(receipt.len),
|
42923
42597
|
digest: hexOrZero(receipt.digest),
|
@@ -42929,7 +42603,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42929
42603
|
case "PANIC" /* Panic */: {
|
42930
42604
|
const panicReceipt = {
|
42931
42605
|
type: ReceiptType.Panic,
|
42932
|
-
id: hexOrZero(receipt.id),
|
42606
|
+
id: hexOrZero(receipt.contract?.id),
|
42933
42607
|
reason: bn(receipt.reason),
|
42934
42608
|
pc: bn(receipt.pc),
|
42935
42609
|
is: bn(receipt.is),
|
@@ -42940,7 +42614,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42940
42614
|
case "REVERT" /* Revert */: {
|
42941
42615
|
const revertReceipt = {
|
42942
42616
|
type: ReceiptType.Revert,
|
42943
|
-
id: hexOrZero(receipt.id
|
42617
|
+
id: hexOrZero(receipt.contract?.id),
|
42944
42618
|
val: bn(receipt.ra),
|
42945
42619
|
pc: bn(receipt.pc),
|
42946
42620
|
is: bn(receipt.is)
|
@@ -42950,7 +42624,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42950
42624
|
case "LOG" /* Log */: {
|
42951
42625
|
const logReceipt = {
|
42952
42626
|
type: ReceiptType.Log,
|
42953
|
-
id: hexOrZero(receipt.id
|
42627
|
+
id: hexOrZero(receipt.contract?.id),
|
42954
42628
|
val0: bn(receipt.ra),
|
42955
42629
|
val1: bn(receipt.rb),
|
42956
42630
|
val2: bn(receipt.rc),
|
@@ -42963,7 +42637,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42963
42637
|
case "LOG_DATA" /* LogData */: {
|
42964
42638
|
const logDataReceipt = {
|
42965
42639
|
type: ReceiptType.LogData,
|
42966
|
-
id: hexOrZero(receipt.id
|
42640
|
+
id: hexOrZero(receipt.contract?.id),
|
42967
42641
|
val0: bn(receipt.ra),
|
42968
42642
|
val1: bn(receipt.rb),
|
42969
42643
|
ptr: bn(receipt.ptr),
|
@@ -42977,8 +42651,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42977
42651
|
case "TRANSFER" /* Transfer */: {
|
42978
42652
|
const transferReceipt = {
|
42979
42653
|
type: ReceiptType.Transfer,
|
42980
|
-
from: hexOrZero(receipt.id
|
42981
|
-
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42654
|
+
from: hexOrZero(receipt.contract?.id),
|
42655
|
+
to: hexOrZero(receipt.toAddress || receipt?.to?.id),
|
42982
42656
|
amount: bn(receipt.amount),
|
42983
42657
|
assetId: hexOrZero(receipt.assetId),
|
42984
42658
|
pc: bn(receipt.pc),
|
@@ -42989,8 +42663,8 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42989
42663
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42990
42664
|
const transferOutReceipt = {
|
42991
42665
|
type: ReceiptType.TransferOut,
|
42992
|
-
from: hexOrZero(receipt.id
|
42993
|
-
to: hexOrZero(receipt.toAddress || receipt.to),
|
42666
|
+
from: hexOrZero(receipt.contract?.id),
|
42667
|
+
to: hexOrZero(receipt.toAddress || receipt.to?.id),
|
42994
42668
|
amount: bn(receipt.amount),
|
42995
42669
|
assetId: hexOrZero(receipt.assetId),
|
42996
42670
|
pc: bn(receipt.pc),
|
@@ -43033,7 +42707,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43033
42707
|
return receiptMessageOut;
|
43034
42708
|
}
|
43035
42709
|
case "MINT" /* Mint */: {
|
43036
|
-
const contractId = hexOrZero(receipt.id
|
42710
|
+
const contractId = hexOrZero(receipt.contract?.id);
|
43037
42711
|
const subId = hexOrZero(receipt.subId);
|
43038
42712
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
43039
42713
|
const mintReceipt = {
|
@@ -43048,7 +42722,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43048
42722
|
return mintReceipt;
|
43049
42723
|
}
|
43050
42724
|
case "BURN" /* Burn */: {
|
43051
|
-
const contractId = hexOrZero(receipt.id
|
42725
|
+
const contractId = hexOrZero(receipt.contract?.id);
|
43052
42726
|
const subId = hexOrZero(receipt.subId);
|
43053
42727
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
43054
42728
|
const burnReceipt = {
|
@@ -43068,6 +42742,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43068
42742
|
}
|
43069
42743
|
|
43070
42744
|
// src/providers/utils/gas.ts
|
42745
|
+
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
43071
42746
|
var getGasUsedFromReceipts = (receipts) => {
|
43072
42747
|
const scriptResult = receipts.filter(
|
43073
42748
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -43088,28 +42763,18 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43088
42763
|
}
|
43089
42764
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
43090
42765
|
const witnessCache = [];
|
43091
|
-
const
|
43092
|
-
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43093
|
-
if (isCoinOrMessage) {
|
43094
|
-
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43095
|
-
return true;
|
43096
|
-
}
|
43097
|
-
if (!witnessCache.includes(input.witnessIndex)) {
|
43098
|
-
witnessCache.push(input.witnessIndex);
|
43099
|
-
return true;
|
43100
|
-
}
|
43101
|
-
}
|
43102
|
-
return false;
|
43103
|
-
});
|
43104
|
-
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43105
|
-
const totalGas = chargeableInputs.reduce((total, input) => {
|
42766
|
+
const totalGas = inputs.reduce((total, input) => {
|
43106
42767
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43107
42768
|
return total.add(
|
43108
|
-
|
42769
|
+
resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization).add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
43109
42770
|
);
|
43110
42771
|
}
|
43111
|
-
|
43112
|
-
|
42772
|
+
if ("witnessIndex" in input && !witnessCache.includes(input.witnessIndex)) {
|
42773
|
+
witnessCache.push(input.witnessIndex);
|
42774
|
+
return total.add(gasCosts.ecr1);
|
42775
|
+
}
|
42776
|
+
return total;
|
42777
|
+
}, bn());
|
43113
42778
|
return totalGas;
|
43114
42779
|
}
|
43115
42780
|
function getMinGas(params) {
|
@@ -43121,20 +42786,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43121
42786
|
return minGas;
|
43122
42787
|
}
|
43123
42788
|
function getMaxGas(params) {
|
43124
|
-
const {
|
43125
|
-
gasPerByte,
|
43126
|
-
witnessesLength,
|
43127
|
-
witnessLimit,
|
43128
|
-
minGas,
|
43129
|
-
gasLimit = bn(0),
|
43130
|
-
maxGasPerTx
|
43131
|
-
} = params;
|
42789
|
+
const { gasPerByte, witnessesLength, witnessLimit, minGas, gasLimit = bn(0) } = params;
|
43132
42790
|
let remainingAllowedWitnessGas = bn(0);
|
43133
42791
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
43134
42792
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
43135
42793
|
}
|
43136
|
-
|
43137
|
-
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42794
|
+
return remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43138
42795
|
}
|
43139
42796
|
function calculateMetadataGasForTxCreate({
|
43140
42797
|
gasCosts,
|
@@ -43156,10 +42813,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
43156
42813
|
}) {
|
43157
42814
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
43158
42815
|
}
|
43159
|
-
var calculateGasFee = (params) => {
|
43160
|
-
const { gas, gasPrice, priceFactor, tip } = params;
|
43161
|
-
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43162
|
-
};
|
43163
42816
|
|
43164
42817
|
// src/providers/utils/json.ts
|
43165
42818
|
function normalize2(object) {
|
@@ -43289,7 +42942,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43289
42942
|
// src/providers/transaction-request/transaction-request.ts
|
43290
42943
|
var BaseTransactionRequest = class {
|
43291
42944
|
/** Gas price for transaction */
|
43292
|
-
|
42945
|
+
gasPrice;
|
43293
42946
|
/** Block until which tx cannot be included */
|
43294
42947
|
maturity;
|
43295
42948
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -43308,7 +42961,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43308
42961
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
43309
42962
|
*/
|
43310
42963
|
constructor({
|
43311
|
-
|
42964
|
+
gasPrice,
|
43312
42965
|
maturity,
|
43313
42966
|
maxFee,
|
43314
42967
|
witnessLimit,
|
@@ -43316,7 +42969,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43316
42969
|
outputs,
|
43317
42970
|
witnesses
|
43318
42971
|
} = {}) {
|
43319
|
-
this.
|
42972
|
+
this.gasPrice = bn(gasPrice);
|
43320
42973
|
this.maturity = maturity ?? 0;
|
43321
42974
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
43322
42975
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
@@ -43327,9 +42980,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43327
42980
|
static getPolicyMeta(req) {
|
43328
42981
|
let policyTypes = 0;
|
43329
42982
|
const policies = [];
|
43330
|
-
if (req.
|
43331
|
-
policyTypes += PolicyType.
|
43332
|
-
policies.push({ data: req.
|
42983
|
+
if (req.gasPrice) {
|
42984
|
+
policyTypes += PolicyType.GasPrice;
|
42985
|
+
policies.push({ data: req.gasPrice, type: PolicyType.GasPrice });
|
43333
42986
|
}
|
43334
42987
|
if (req.witnessLimit) {
|
43335
42988
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43513,11 +43166,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43513
43166
|
* assetId, if one it was not added yet.
|
43514
43167
|
*
|
43515
43168
|
* @param coin - Coin resource.
|
43169
|
+
* @param predicate - Predicate bytes.
|
43170
|
+
* @param predicateData - Predicate data bytes.
|
43516
43171
|
*/
|
43517
|
-
addCoinInput(coin) {
|
43172
|
+
addCoinInput(coin, predicate) {
|
43518
43173
|
const { assetId, owner, amount } = coin;
|
43519
43174
|
let witnessIndex;
|
43520
|
-
if (
|
43175
|
+
if (predicate) {
|
43521
43176
|
witnessIndex = 0;
|
43522
43177
|
} else {
|
43523
43178
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43532,7 +43187,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43532
43187
|
amount,
|
43533
43188
|
assetId,
|
43534
43189
|
txPointer: "0x00000000000000000000000000000000",
|
43535
|
-
witnessIndex
|
43190
|
+
witnessIndex,
|
43191
|
+
predicate: predicate?.bytes
|
43536
43192
|
};
|
43537
43193
|
this.pushInput(input);
|
43538
43194
|
this.addChangeOutput(owner, assetId);
|
@@ -43542,12 +43198,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43542
43198
|
* baseAssetId, if one it was not added yet.
|
43543
43199
|
*
|
43544
43200
|
* @param message - Message resource.
|
43201
|
+
* @param predicate - Predicate bytes.
|
43202
|
+
* @param predicateData - Predicate data bytes.
|
43545
43203
|
*/
|
43546
|
-
addMessageInput(message) {
|
43204
|
+
addMessageInput(message, predicate) {
|
43547
43205
|
const { recipient, sender, amount } = message;
|
43548
43206
|
const assetId = BaseAssetId;
|
43549
43207
|
let witnessIndex;
|
43550
|
-
if (
|
43208
|
+
if (predicate) {
|
43551
43209
|
witnessIndex = 0;
|
43552
43210
|
} else {
|
43553
43211
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43561,7 +43219,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43561
43219
|
sender: sender.toB256(),
|
43562
43220
|
recipient: recipient.toB256(),
|
43563
43221
|
amount,
|
43564
|
-
witnessIndex
|
43222
|
+
witnessIndex,
|
43223
|
+
predicate: predicate?.bytes
|
43565
43224
|
};
|
43566
43225
|
this.pushInput(input);
|
43567
43226
|
this.addChangeOutput(recipient, assetId);
|
@@ -43592,6 +43251,32 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43592
43251
|
resources.forEach((resource) => this.addResource(resource));
|
43593
43252
|
return this;
|
43594
43253
|
}
|
43254
|
+
/**
|
43255
|
+
* Adds multiple resources to the transaction by adding coin/message inputs and change
|
43256
|
+
* outputs from the related assetIds.
|
43257
|
+
*
|
43258
|
+
* @param resources - The resources to add.
|
43259
|
+
* @returns This transaction.
|
43260
|
+
*/
|
43261
|
+
addPredicateResource(resource, predicate) {
|
43262
|
+
if (isCoin(resource)) {
|
43263
|
+
this.addCoinInput(resource, predicate);
|
43264
|
+
} else {
|
43265
|
+
this.addMessageInput(resource, predicate);
|
43266
|
+
}
|
43267
|
+
return this;
|
43268
|
+
}
|
43269
|
+
/**
|
43270
|
+
* Adds multiple predicate coin/message inputs to the transaction and change outputs
|
43271
|
+
* from the related assetIds.
|
43272
|
+
*
|
43273
|
+
* @param resources - The resources to add.
|
43274
|
+
* @returns This transaction.
|
43275
|
+
*/
|
43276
|
+
addPredicateResources(resources, predicate) {
|
43277
|
+
resources.forEach((resource) => this.addPredicateResource(resource, predicate));
|
43278
|
+
return this;
|
43279
|
+
}
|
43595
43280
|
/**
|
43596
43281
|
* Adds a coin output to the transaction.
|
43597
43282
|
*
|
@@ -43671,7 +43356,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43671
43356
|
}
|
43672
43357
|
calculateMaxGas(chainInfo, minGas) {
|
43673
43358
|
const { consensusParameters } = chainInfo;
|
43674
|
-
const { gasPerByte
|
43359
|
+
const { gasPerByte } = consensusParameters;
|
43675
43360
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43676
43361
|
(acc, wit) => acc + wit.dataLength,
|
43677
43362
|
0
|
@@ -43680,8 +43365,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43680
43365
|
gasPerByte,
|
43681
43366
|
minGas,
|
43682
43367
|
witnessesLength,
|
43683
|
-
witnessLimit: this.witnessLimit
|
43684
|
-
maxGasPerTx
|
43368
|
+
witnessLimit: this.witnessLimit
|
43685
43369
|
});
|
43686
43370
|
}
|
43687
43371
|
/**
|
@@ -43699,20 +43383,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43699
43383
|
});
|
43700
43384
|
const updateAssetInput = (assetId, quantity) => {
|
43701
43385
|
const assetInput = findAssetInput(assetId);
|
43702
|
-
let usedQuantity = quantity;
|
43703
|
-
if (assetId === BaseAssetId) {
|
43704
|
-
usedQuantity = bn("1000000000000000000");
|
43705
|
-
}
|
43706
43386
|
if (assetInput && "assetId" in assetInput) {
|
43707
43387
|
assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
|
43708
|
-
assetInput.amount =
|
43388
|
+
assetInput.amount = quantity;
|
43709
43389
|
} else {
|
43710
43390
|
this.addResources([
|
43711
43391
|
{
|
43712
43392
|
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
43713
|
-
amount:
|
43393
|
+
amount: quantity,
|
43714
43394
|
assetId,
|
43715
43395
|
owner: resourcesOwner || Address.fromRandom(),
|
43396
|
+
maturity: 0,
|
43716
43397
|
blockCreated: bn(1),
|
43717
43398
|
txCreatedIdx: bn(1)
|
43718
43399
|
}
|
@@ -43744,7 +43425,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43744
43425
|
toJSON() {
|
43745
43426
|
return normalizeJSON(this);
|
43746
43427
|
}
|
43747
|
-
|
43428
|
+
updatePredicateInputs(inputs) {
|
43748
43429
|
this.inputs.forEach((i) => {
|
43749
43430
|
let correspondingInput;
|
43750
43431
|
switch (i.type) {
|
@@ -43766,15 +43447,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43766
43447
|
}
|
43767
43448
|
});
|
43768
43449
|
}
|
43769
|
-
shiftPredicateData() {
|
43770
|
-
this.inputs.forEach((input) => {
|
43771
|
-
if ("predicateData" in input && "padPredicateData" in input && typeof input.padPredicateData === "function") {
|
43772
|
-
input.predicateData = input.padPredicateData(
|
43773
|
-
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43774
|
-
);
|
43775
|
-
}
|
43776
|
-
});
|
43777
|
-
}
|
43778
43450
|
};
|
43779
43451
|
|
43780
43452
|
// src/providers/transaction-request/hash-transaction.ts
|
@@ -43908,8 +43580,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43908
43580
|
return {
|
43909
43581
|
type: TransactionType.Create,
|
43910
43582
|
...baseTransaction,
|
43583
|
+
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43911
43584
|
bytecodeWitnessIndex,
|
43912
|
-
storageSlotsCount:
|
43585
|
+
storageSlotsCount: storageSlots.length,
|
43913
43586
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43914
43587
|
storageSlots
|
43915
43588
|
};
|
@@ -44023,8 +43696,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44023
43696
|
type: TransactionType.Script,
|
44024
43697
|
scriptGasLimit: this.gasLimit,
|
44025
43698
|
...super.getBaseTransaction(),
|
44026
|
-
scriptLength:
|
44027
|
-
scriptDataLength:
|
43699
|
+
scriptLength: script.length,
|
43700
|
+
scriptDataLength: scriptData.length,
|
44028
43701
|
receiptsRoot: ZeroBytes32,
|
44029
43702
|
script: hexlify(script),
|
44030
43703
|
scriptData: hexlify(scriptData)
|
@@ -44088,7 +43761,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44088
43761
|
}
|
44089
43762
|
calculateMaxGas(chainInfo, minGas) {
|
44090
43763
|
const { consensusParameters } = chainInfo;
|
44091
|
-
const { gasPerByte
|
43764
|
+
const { gasPerByte } = consensusParameters;
|
44092
43765
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
44093
43766
|
(acc, wit) => acc + wit.dataLength,
|
44094
43767
|
0
|
@@ -44098,8 +43771,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44098
43771
|
minGas,
|
44099
43772
|
witnessesLength,
|
44100
43773
|
witnessLimit: this.witnessLimit,
|
44101
|
-
gasLimit: this.gasLimit
|
44102
|
-
maxGasPerTx
|
43774
|
+
gasLimit: this.gasLimit
|
44103
43775
|
});
|
44104
43776
|
}
|
44105
43777
|
/**
|
@@ -44172,29 +43844,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44172
43844
|
}
|
44173
43845
|
}
|
44174
43846
|
};
|
44175
|
-
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44176
|
-
(acc, input) => {
|
44177
|
-
if (input.type === InputType.Coin && input.owner === owner) {
|
44178
|
-
acc.utxos.push(input.id);
|
44179
|
-
}
|
44180
|
-
if (input.type === InputType.Message && input.recipient === owner) {
|
44181
|
-
acc.messages.push(input.nonce);
|
44182
|
-
}
|
44183
|
-
return acc;
|
44184
|
-
},
|
44185
|
-
{
|
44186
|
-
utxos: [],
|
44187
|
-
messages: []
|
44188
|
-
}
|
44189
|
-
);
|
44190
43847
|
|
44191
43848
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
44192
43849
|
var calculateTransactionFee = (params) => {
|
44193
43850
|
const {
|
44194
|
-
|
43851
|
+
gasUsed,
|
44195
43852
|
rawPayload,
|
44196
|
-
|
44197
|
-
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43853
|
+
consensusParameters: { gasCosts, feeParams }
|
44198
43854
|
} = params;
|
44199
43855
|
const gasPerByte = bn(feeParams.gasPerByte);
|
44200
43856
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -44204,7 +43860,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44204
43860
|
return {
|
44205
43861
|
fee: bn(0),
|
44206
43862
|
minFee: bn(0),
|
44207
|
-
maxFee: bn(0)
|
43863
|
+
maxFee: bn(0),
|
43864
|
+
feeFromGasUsed: bn(0)
|
44208
43865
|
};
|
44209
43866
|
}
|
44210
43867
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -44236,6 +43893,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44236
43893
|
metadataGas,
|
44237
43894
|
txBytesSize: transactionBytes.length
|
44238
43895
|
});
|
43896
|
+
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
44239
43897
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
44240
43898
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
44241
43899
|
const maxGas = getMaxGas({
|
@@ -44243,25 +43901,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44243
43901
|
minGas,
|
44244
43902
|
witnessesLength,
|
44245
43903
|
gasLimit,
|
44246
|
-
witnessLimit
|
44247
|
-
maxGasPerTx
|
44248
|
-
});
|
44249
|
-
const minFee = calculateGasFee({
|
44250
|
-
gasPrice,
|
44251
|
-
gas: minGas,
|
44252
|
-
priceFactor: gasPriceFactor,
|
44253
|
-
tip
|
44254
|
-
});
|
44255
|
-
const maxFee = calculateGasFee({
|
44256
|
-
gasPrice,
|
44257
|
-
gas: maxGas,
|
44258
|
-
priceFactor: gasPriceFactor,
|
44259
|
-
tip
|
43904
|
+
witnessLimit
|
44260
43905
|
});
|
43906
|
+
const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
|
43907
|
+
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
|
43908
|
+
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
|
43909
|
+
const fee = minFee.add(feeFromGasUsed);
|
44261
43910
|
return {
|
43911
|
+
fee,
|
44262
43912
|
minFee,
|
44263
43913
|
maxFee,
|
44264
|
-
|
43914
|
+
feeFromGasUsed
|
44265
43915
|
};
|
44266
43916
|
};
|
44267
43917
|
|
@@ -44815,9 +44465,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44815
44465
|
gqlTransactionStatus,
|
44816
44466
|
abiMap = {},
|
44817
44467
|
maxInputs,
|
44818
|
-
gasCosts
|
44819
|
-
maxGasPerTx,
|
44820
|
-
gasPrice
|
44468
|
+
gasCosts
|
44821
44469
|
} = params;
|
44822
44470
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44823
44471
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44831,14 +44479,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44831
44479
|
maxInputs
|
44832
44480
|
});
|
44833
44481
|
const typeName = getTransactionTypeName(transaction.type);
|
44834
|
-
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44835
44482
|
const { fee } = calculateTransactionFee({
|
44836
|
-
|
44483
|
+
gasUsed,
|
44837
44484
|
rawPayload,
|
44838
|
-
tip,
|
44839
44485
|
consensusParameters: {
|
44840
44486
|
gasCosts,
|
44841
|
-
maxGasPerTx,
|
44842
44487
|
feeParams: {
|
44843
44488
|
gasPerByte,
|
44844
44489
|
gasPriceFactor
|
@@ -44974,13 +44619,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44974
44619
|
const decodedTransaction = this.decodeTransaction(
|
44975
44620
|
transaction
|
44976
44621
|
);
|
44977
|
-
|
44978
|
-
|
44979
|
-
txReceipts = transaction.status.receipts;
|
44980
|
-
}
|
44981
|
-
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44982
|
-
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44983
|
-
const gasPrice = await this.provider.getLatestGasPrice();
|
44622
|
+
const receipts = transaction.receipts?.map(processGqlReceipt) || [];
|
44623
|
+
const { gasPerByte, gasPriceFactor, gasCosts } = this.provider.getGasConfig();
|
44984
44624
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44985
44625
|
const transactionSummary = assembleTransactionSummary({
|
44986
44626
|
id: this.id,
|
@@ -44992,9 +44632,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44992
44632
|
gasPriceFactor,
|
44993
44633
|
abiMap: contractsAbiMap,
|
44994
44634
|
maxInputs,
|
44995
|
-
gasCosts
|
44996
|
-
maxGasPerTx,
|
44997
|
-
gasPrice
|
44635
|
+
gasCosts
|
44998
44636
|
});
|
44999
44637
|
return transactionSummary;
|
45000
44638
|
}
|
@@ -45143,7 +44781,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45143
44781
|
gasCosts,
|
45144
44782
|
latestBlock: {
|
45145
44783
|
id: latestBlock.id,
|
45146
|
-
height: bn(latestBlock.height),
|
44784
|
+
height: bn(latestBlock.header.height),
|
45147
44785
|
time: latestBlock.header.time,
|
45148
44786
|
transactions: latestBlock.transactions.map((i) => ({
|
45149
44787
|
id: i.id
|
@@ -45237,8 +44875,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45237
44875
|
* Returns some helpful parameters related to gas fees.
|
45238
44876
|
*/
|
45239
44877
|
getGasConfig() {
|
44878
|
+
const { minGasPrice } = this.getNode();
|
45240
44879
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
45241
44880
|
return {
|
44881
|
+
minGasPrice,
|
45242
44882
|
maxGasPerTx,
|
45243
44883
|
maxGasPerPredicate,
|
45244
44884
|
gasPriceFactor,
|
@@ -45336,7 +44976,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45336
44976
|
*/
|
45337
44977
|
async getBlockNumber() {
|
45338
44978
|
const { chain } = await this.operations.getChain();
|
45339
|
-
return bn(chain.latestBlock.height, 10);
|
44979
|
+
return bn(chain.latestBlock.header.height, 10);
|
45340
44980
|
}
|
45341
44981
|
/**
|
45342
44982
|
* Returns the chain information.
|
@@ -45348,9 +44988,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45348
44988
|
const processedNodeInfo = {
|
45349
44989
|
maxDepth: bn(nodeInfo.maxDepth),
|
45350
44990
|
maxTx: bn(nodeInfo.maxTx),
|
44991
|
+
minGasPrice: bn(nodeInfo.minGasPrice),
|
45351
44992
|
nodeVersion: nodeInfo.nodeVersion,
|
45352
44993
|
utxoValidation: nodeInfo.utxoValidation,
|
45353
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44994
|
+
vmBacktrace: nodeInfo.vmBacktrace,
|
44995
|
+
peers: nodeInfo.peers
|
45354
44996
|
};
|
45355
44997
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
45356
44998
|
return processedNodeInfo;
|
@@ -45436,13 +45078,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45436
45078
|
return this.estimateTxDependencies(transactionRequest);
|
45437
45079
|
}
|
45438
45080
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45439
|
-
const { dryRun:
|
45440
|
-
|
45081
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45082
|
+
encodedTransaction,
|
45441
45083
|
utxoValidation: utxoValidation || false
|
45442
45084
|
});
|
45443
|
-
const
|
45444
|
-
|
45445
|
-
|
45085
|
+
const receipts = gqlReceipts.map(processGqlReceipt);
|
45086
|
+
return {
|
45087
|
+
receipts
|
45088
|
+
};
|
45446
45089
|
}
|
45447
45090
|
/**
|
45448
45091
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45481,6 +45124,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45481
45124
|
* If there are missing variable outputs,
|
45482
45125
|
* `addVariableOutputs` is called on the transaction.
|
45483
45126
|
*
|
45127
|
+
* @privateRemarks
|
45128
|
+
* TODO: Investigate support for missing contract IDs
|
45129
|
+
* TODO: Add support for missing output messages
|
45484
45130
|
*
|
45485
45131
|
* @param transactionRequest - The transaction request object.
|
45486
45132
|
* @returns A promise.
|
@@ -45493,19 +45139,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45493
45139
|
missingContractIds: []
|
45494
45140
|
};
|
45495
45141
|
}
|
45142
|
+
await this.estimatePredicates(transactionRequest);
|
45496
45143
|
let receipts = [];
|
45497
45144
|
const missingContractIds = [];
|
45498
45145
|
let outputVariables = 0;
|
45499
|
-
let dryrunStatus;
|
45500
45146
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45501
|
-
const {
|
45502
|
-
|
45503
|
-
} = await this.operations.dryRun({
|
45504
|
-
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45147
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45148
|
+
encodedTransaction: hexlify(transactionRequest.toTransactionBytes()),
|
45505
45149
|
utxoValidation: false
|
45506
45150
|
});
|
45507
|
-
receipts =
|
45508
|
-
dryrunStatus = status;
|
45151
|
+
receipts = gqlReceipts.map(processGqlReceipt);
|
45509
45152
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45510
45153
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45511
45154
|
if (hasMissingOutputs) {
|
@@ -45515,10 +45158,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45515
45158
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45516
45159
|
missingContractIds.push(contractId);
|
45517
45160
|
});
|
45518
|
-
const { maxFee } = await this.estimateTxGasAndFee({
|
45519
|
-
transactionRequest
|
45520
|
-
});
|
45521
|
-
transactionRequest.maxFee = maxFee;
|
45522
45161
|
} else {
|
45523
45162
|
break;
|
45524
45163
|
}
|
@@ -45526,139 +45165,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45526
45165
|
return {
|
45527
45166
|
receipts,
|
45528
45167
|
outputVariables,
|
45529
|
-
missingContractIds
|
45530
|
-
dryrunStatus
|
45168
|
+
missingContractIds
|
45531
45169
|
};
|
45532
45170
|
}
|
45533
|
-
/**
|
45534
|
-
* Dry runs multiple transactions and checks for missing dependencies in batches.
|
45535
|
-
*
|
45536
|
-
* Transactions are dry run in batches. After each dry run, transactions requiring
|
45537
|
-
* further modifications are identified. The method iteratively updates these transactions
|
45538
|
-
* and performs subsequent dry runs until all dependencies for each transaction are satisfied.
|
45539
|
-
*
|
45540
|
-
* @param transactionRequests - Array of transaction request objects.
|
45541
|
-
* @returns A promise that resolves to an array of results for each transaction.
|
45542
|
-
*/
|
45543
|
-
async estimateMultipleTxDependencies(transactionRequests) {
|
45544
|
-
const results = transactionRequests.map(() => ({
|
45545
|
-
receipts: [],
|
45546
|
-
outputVariables: 0,
|
45547
|
-
missingContractIds: [],
|
45548
|
-
dryrunStatus: void 0
|
45549
|
-
}));
|
45550
|
-
const allRequests = clone_default(transactionRequests);
|
45551
|
-
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45552
|
-
allRequests.forEach((req, index) => {
|
45553
|
-
if (req.type === TransactionType.Script) {
|
45554
|
-
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45555
|
-
}
|
45556
|
-
});
|
45557
|
-
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45558
|
-
let attempt = 0;
|
45559
|
-
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45560
|
-
const encodedTransactions = transactionsToProcess.map(
|
45561
|
-
(index) => serializedTransactionsMap.get(index)
|
45562
|
-
);
|
45563
|
-
const dryRunResults = await this.operations.dryRun({
|
45564
|
-
encodedTransactions,
|
45565
|
-
utxoValidation: false
|
45566
|
-
});
|
45567
|
-
const nextRoundTransactions = [];
|
45568
|
-
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45569
|
-
const currentResultIndex = transactionsToProcess[i];
|
45570
|
-
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45571
|
-
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45572
|
-
results[currentResultIndex].dryrunStatus = status;
|
45573
|
-
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45574
|
-
results[currentResultIndex].receipts
|
45575
|
-
);
|
45576
|
-
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45577
|
-
const requestToProcess = allRequests[currentResultIndex];
|
45578
|
-
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45579
|
-
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45580
|
-
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45581
|
-
missingOutputContractIds.forEach(({ contractId }) => {
|
45582
|
-
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45583
|
-
results[currentResultIndex].missingContractIds.push(contractId);
|
45584
|
-
});
|
45585
|
-
const { maxFee } = await this.estimateTxGasAndFee({
|
45586
|
-
transactionRequest: requestToProcess
|
45587
|
-
});
|
45588
|
-
requestToProcess.maxFee = maxFee;
|
45589
|
-
serializedTransactionsMap.set(
|
45590
|
-
currentResultIndex,
|
45591
|
-
hexlify(requestToProcess.toTransactionBytes())
|
45592
|
-
);
|
45593
|
-
nextRoundTransactions.push(currentResultIndex);
|
45594
|
-
allRequests[currentResultIndex] = requestToProcess;
|
45595
|
-
}
|
45596
|
-
}
|
45597
|
-
transactionsToProcess = nextRoundTransactions;
|
45598
|
-
attempt += 1;
|
45599
|
-
}
|
45600
|
-
return results;
|
45601
|
-
}
|
45602
|
-
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45603
|
-
if (estimateTxDependencies) {
|
45604
|
-
return this.estimateMultipleTxDependencies(transactionRequests);
|
45605
|
-
}
|
45606
|
-
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45607
|
-
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45608
|
-
encodedTransactions,
|
45609
|
-
utxoValidation: utxoValidation || false
|
45610
|
-
});
|
45611
|
-
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45612
|
-
const receipts = rawReceipts.map(processGqlReceipt);
|
45613
|
-
return { receipts, dryrunStatus: status };
|
45614
|
-
});
|
45615
|
-
return results;
|
45616
|
-
}
|
45617
45171
|
/**
|
45618
45172
|
* Estimates the transaction gas and fee based on the provided transaction request.
|
45619
45173
|
* @param transactionRequest - The transaction request object.
|
45620
45174
|
* @returns An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.
|
45621
45175
|
*/
|
45622
|
-
|
45176
|
+
estimateTxGasAndFee(params) {
|
45623
45177
|
const { transactionRequest } = params;
|
45624
|
-
|
45178
|
+
const { gasPriceFactor, minGasPrice, maxGasPerTx } = this.getGasConfig();
|
45625
45179
|
const chainInfo = this.getChain();
|
45626
|
-
const
|
45180
|
+
const gasPrice = transactionRequest.gasPrice.eq(0) ? minGasPrice : transactionRequest.gasPrice;
|
45181
|
+
transactionRequest.gasPrice = gasPrice;
|
45627
45182
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45628
|
-
|
45629
|
-
gasPrice = await this.estimateGasPrice(10);
|
45630
|
-
}
|
45631
|
-
const minFee = calculateGasFee({
|
45632
|
-
gasPrice: bn(gasPrice),
|
45633
|
-
gas: minGas,
|
45634
|
-
priceFactor: gasPriceFactor,
|
45635
|
-
tip: transactionRequest.tip
|
45636
|
-
}).add(1);
|
45637
|
-
let gasLimit = bn(0);
|
45183
|
+
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45638
45184
|
if (transactionRequest.type === TransactionType.Script) {
|
45639
|
-
gasLimit = transactionRequest.gasLimit;
|
45640
45185
|
if (transactionRequest.gasLimit.eq(0)) {
|
45641
45186
|
transactionRequest.gasLimit = minGas;
|
45642
45187
|
transactionRequest.gasLimit = maxGasPerTx.sub(
|
45643
45188
|
transactionRequest.calculateMaxGas(chainInfo, minGas)
|
45644
45189
|
);
|
45645
|
-
gasLimit = transactionRequest.gasLimit;
|
45646
45190
|
}
|
45647
45191
|
}
|
45648
45192
|
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45649
|
-
const maxFee =
|
45650
|
-
gasPrice: bn(gasPrice),
|
45651
|
-
gas: maxGas,
|
45652
|
-
priceFactor: gasPriceFactor,
|
45653
|
-
tip: transactionRequest.tip
|
45654
|
-
}).add(1);
|
45193
|
+
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45655
45194
|
return {
|
45656
45195
|
minGas,
|
45657
45196
|
minFee,
|
45658
45197
|
maxGas,
|
45659
|
-
maxFee
|
45660
|
-
gasPrice,
|
45661
|
-
gasLimit
|
45198
|
+
maxFee
|
45662
45199
|
};
|
45663
45200
|
}
|
45664
45201
|
/**
|
@@ -45676,17 +45213,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45676
45213
|
if (estimateTxDependencies) {
|
45677
45214
|
return this.estimateTxDependencies(transactionRequest);
|
45678
45215
|
}
|
45679
|
-
const
|
45680
|
-
const { dryRun:
|
45681
|
-
|
45216
|
+
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45217
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45218
|
+
encodedTransaction,
|
45682
45219
|
utxoValidation: true
|
45683
45220
|
});
|
45684
|
-
const
|
45685
|
-
|
45686
|
-
|
45687
|
-
|
45688
|
-
});
|
45689
|
-
return { receipts: callResult[0].receipts };
|
45221
|
+
const receipts = gqlReceipts.map(processGqlReceipt);
|
45222
|
+
return {
|
45223
|
+
receipts
|
45224
|
+
};
|
45690
45225
|
}
|
45691
45226
|
/**
|
45692
45227
|
* Returns a transaction cost to enable user
|
@@ -45703,79 +45238,77 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45703
45238
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45704
45239
|
* @returns A promise that resolves to the transaction cost object.
|
45705
45240
|
*/
|
45706
|
-
async getTransactionCost(transactionRequestLike,
|
45241
|
+
async getTransactionCost(transactionRequestLike, forwardingQuantities = [], {
|
45242
|
+
estimateTxDependencies = true,
|
45243
|
+
estimatePredicates = true,
|
45244
|
+
resourcesOwner,
|
45245
|
+
signatureCallback
|
45246
|
+
} = {}) {
|
45707
45247
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
45248
|
+
const { minGasPrice } = this.getGasConfig();
|
45249
|
+
const setGasPrice = max(txRequestClone.gasPrice, minGasPrice);
|
45708
45250
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45709
45251
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45710
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45252
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, forwardingQuantities);
|
45711
45253
|
txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
|
45712
|
-
txRequestClone.maxFee = bn(0);
|
45713
45254
|
if (isScriptTransaction) {
|
45714
45255
|
txRequestClone.gasLimit = bn(0);
|
45715
45256
|
}
|
45716
|
-
if (
|
45717
|
-
resourcesOwner
|
45257
|
+
if (estimatePredicates) {
|
45258
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45259
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45260
|
+
}
|
45261
|
+
await this.estimatePredicates(txRequestClone);
|
45718
45262
|
}
|
45719
|
-
const signedRequest = clone_default(txRequestClone);
|
45720
|
-
let addedSignatures = 0;
|
45721
45263
|
if (signatureCallback && isScriptTransaction) {
|
45722
|
-
|
45723
|
-
await signatureCallback(signedRequest);
|
45724
|
-
addedSignatures = signedRequest.witnesses.length - lengthBefore;
|
45264
|
+
await signatureCallback(txRequestClone);
|
45725
45265
|
}
|
45726
|
-
|
45727
|
-
|
45728
|
-
transactionRequest: signedRequest
|
45266
|
+
let { maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
|
45267
|
+
transactionRequest: txRequestClone
|
45729
45268
|
});
|
45730
45269
|
let receipts = [];
|
45731
45270
|
let missingContractIds = [];
|
45732
45271
|
let outputVariables = 0;
|
45733
45272
|
let gasUsed = bn(0);
|
45734
|
-
|
45735
|
-
|
45736
|
-
if (isScriptTransaction) {
|
45737
|
-
txRequestClone.gasLimit = gasLimit;
|
45738
|
-
if (signatureCallback) {
|
45739
|
-
await signatureCallback(txRequestClone);
|
45740
|
-
}
|
45273
|
+
if (isScriptTransaction && estimateTxDependencies) {
|
45274
|
+
txRequestClone.gasPrice = bn(0);
|
45741
45275
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45742
45276
|
receipts = result.receipts;
|
45743
45277
|
outputVariables = result.outputVariables;
|
45744
45278
|
missingContractIds = result.missingContractIds;
|
45745
45279
|
gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : gasUsed;
|
45746
45280
|
txRequestClone.gasLimit = gasUsed;
|
45747
|
-
|
45748
|
-
|
45749
|
-
|
45281
|
+
txRequestClone.gasPrice = setGasPrice;
|
45282
|
+
({ maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
|
45283
|
+
transactionRequest: txRequestClone
|
45750
45284
|
}));
|
45751
45285
|
}
|
45752
45286
|
return {
|
45753
45287
|
requiredQuantities: allQuantities,
|
45754
45288
|
receipts,
|
45755
45289
|
gasUsed,
|
45756
|
-
|
45290
|
+
minGasPrice,
|
45291
|
+
gasPrice: setGasPrice,
|
45757
45292
|
minGas,
|
45758
45293
|
maxGas,
|
45759
45294
|
minFee,
|
45760
45295
|
maxFee,
|
45296
|
+
estimatedInputs: txRequestClone.inputs,
|
45761
45297
|
outputVariables,
|
45762
|
-
missingContractIds
|
45763
|
-
addedSignatures,
|
45764
|
-
estimatedPredicates: txRequestClone.inputs
|
45298
|
+
missingContractIds
|
45765
45299
|
};
|
45766
45300
|
}
|
45767
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45301
|
+
async getResourcesForTransaction(owner, transactionRequestLike, forwardingQuantities = []) {
|
45768
45302
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45769
45303
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45770
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45771
|
-
quantitiesToContract
|
45772
|
-
});
|
45304
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, forwardingQuantities);
|
45773
45305
|
transactionRequest.addResources(
|
45774
45306
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45775
45307
|
);
|
45776
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45777
|
-
|
45778
|
-
|
45308
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45309
|
+
transactionRequest,
|
45310
|
+
forwardingQuantities
|
45311
|
+
);
|
45779
45312
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45780
45313
|
return {
|
45781
45314
|
resources,
|
@@ -45799,6 +45332,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45799
45332
|
assetId: coin.assetId,
|
45800
45333
|
amount: bn(coin.amount),
|
45801
45334
|
owner: Address.fromAddressOrString(coin.owner),
|
45335
|
+
maturity: bn(coin.maturity).toNumber(),
|
45802
45336
|
blockCreated: bn(coin.blockCreated),
|
45803
45337
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45804
45338
|
}));
|
@@ -45850,6 +45384,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45850
45384
|
amount: bn(coin.amount),
|
45851
45385
|
assetId: coin.assetId,
|
45852
45386
|
owner: Address.fromAddressOrString(coin.owner),
|
45387
|
+
maturity: bn(coin.maturity).toNumber(),
|
45853
45388
|
blockCreated: bn(coin.blockCreated),
|
45854
45389
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45855
45390
|
};
|
@@ -45882,7 +45417,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45882
45417
|
}
|
45883
45418
|
return {
|
45884
45419
|
id: block2.id,
|
45885
|
-
height: bn(block2.height),
|
45420
|
+
height: bn(block2.header.height),
|
45886
45421
|
time: block2.header.time,
|
45887
45422
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45888
45423
|
};
|
@@ -45897,7 +45432,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45897
45432
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45898
45433
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45899
45434
|
id: block2.id,
|
45900
|
-
height: bn(block2.height),
|
45435
|
+
height: bn(block2.header.height),
|
45901
45436
|
time: block2.header.time,
|
45902
45437
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45903
45438
|
}));
|
@@ -45924,7 +45459,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45924
45459
|
}
|
45925
45460
|
return {
|
45926
45461
|
id: block2.id,
|
45927
|
-
height: bn(block2.height, 10),
|
45462
|
+
height: bn(block2.header.height, 10),
|
45928
45463
|
time: block2.header.time,
|
45929
45464
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45930
45465
|
transactions: block2.transactions.map(
|
@@ -46104,11 +45639,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46104
45639
|
prevRoot: messageBlockHeader.prevRoot,
|
46105
45640
|
time: messageBlockHeader.time,
|
46106
45641
|
applicationHash: messageBlockHeader.applicationHash,
|
46107
|
-
|
46108
|
-
|
46109
|
-
consensusParametersVersion: messageBlockHeader.consensusParametersVersion,
|
46110
|
-
eventInboxRoot: messageBlockHeader.eventInboxRoot,
|
46111
|
-
stateTransitionBytecodeVersion: messageBlockHeader.stateTransitionBytecodeVersion
|
45642
|
+
messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
|
45643
|
+
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
|
46112
45644
|
},
|
46113
45645
|
commitBlockHeader: {
|
46114
45646
|
id: commitBlockHeader.id,
|
@@ -46119,11 +45651,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46119
45651
|
prevRoot: commitBlockHeader.prevRoot,
|
46120
45652
|
time: commitBlockHeader.time,
|
46121
45653
|
applicationHash: commitBlockHeader.applicationHash,
|
46122
|
-
|
46123
|
-
|
46124
|
-
consensusParametersVersion: commitBlockHeader.consensusParametersVersion,
|
46125
|
-
eventInboxRoot: commitBlockHeader.eventInboxRoot,
|
46126
|
-
stateTransitionBytecodeVersion: commitBlockHeader.stateTransitionBytecodeVersion
|
45654
|
+
messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
|
45655
|
+
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
|
46127
45656
|
},
|
46128
45657
|
sender: Address.fromAddressOrString(sender),
|
46129
45658
|
recipient: Address.fromAddressOrString(recipient),
|
@@ -46132,16 +45661,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46132
45661
|
data
|
46133
45662
|
};
|
46134
45663
|
}
|
46135
|
-
async getLatestGasPrice() {
|
46136
|
-
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46137
|
-
return bn(latestGasPrice.gasPrice);
|
46138
|
-
}
|
46139
|
-
async estimateGasPrice(blockHorizon) {
|
46140
|
-
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46141
|
-
blockHorizon: String(blockHorizon)
|
46142
|
-
});
|
46143
|
-
return bn(estimateGasPrice.gasPrice);
|
46144
|
-
}
|
46145
45664
|
/**
|
46146
45665
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
46147
45666
|
*
|
@@ -46425,33 +45944,36 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46425
45944
|
* @param fee - The estimated transaction fee.
|
46426
45945
|
* @returns A promise that resolves when the resources are added to the transaction.
|
46427
45946
|
*/
|
46428
|
-
async fund(request,
|
46429
|
-
const
|
46430
|
-
const txRequest = request;
|
46431
|
-
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45947
|
+
async fund(request, coinQuantities, fee) {
|
45948
|
+
const updatedQuantities = addAmountToAsset({
|
46432
45949
|
amount: bn(fee),
|
46433
45950
|
assetId: BaseAssetId,
|
46434
|
-
coinQuantities
|
45951
|
+
coinQuantities
|
46435
45952
|
});
|
46436
45953
|
const quantitiesDict = {};
|
46437
|
-
|
45954
|
+
updatedQuantities.forEach(({ amount, assetId }) => {
|
46438
45955
|
quantitiesDict[assetId] = {
|
46439
45956
|
required: amount,
|
46440
45957
|
owned: bn(0)
|
46441
45958
|
};
|
46442
45959
|
});
|
46443
|
-
|
45960
|
+
const cachedUtxos = [];
|
45961
|
+
const cachedMessages = [];
|
45962
|
+
const owner = this.address.toB256();
|
45963
|
+
request.inputs.forEach((input) => {
|
46444
45964
|
const isResource = "amount" in input;
|
46445
45965
|
if (isResource) {
|
46446
45966
|
const isCoin2 = "owner" in input;
|
46447
45967
|
if (isCoin2) {
|
46448
45968
|
const assetId = String(input.assetId);
|
46449
|
-
if (quantitiesDict[assetId]) {
|
45969
|
+
if (input.owner === owner && quantitiesDict[assetId]) {
|
46450
45970
|
const amount = bn(input.amount);
|
46451
45971
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45972
|
+
cachedUtxos.push(input.id);
|
46452
45973
|
}
|
46453
|
-
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
45974
|
+
} else if (input.recipient === owner && input.amount && quantitiesDict[BaseAssetId]) {
|
46454
45975
|
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45976
|
+
cachedMessages.push(input.nonce);
|
46455
45977
|
}
|
46456
45978
|
}
|
46457
45979
|
});
|
@@ -46466,23 +45988,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46466
45988
|
});
|
46467
45989
|
const needsToBeFunded = missingQuantities.length;
|
46468
45990
|
if (needsToBeFunded) {
|
46469
|
-
const
|
46470
|
-
|
46471
|
-
|
46472
|
-
|
46473
|
-
|
46474
|
-
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46475
|
-
const requestToBeReEstimate = clone_default(txRequest);
|
46476
|
-
if (addedSignatures) {
|
46477
|
-
Array.from({ length: addedSignatures }).forEach(
|
46478
|
-
() => requestToBeReEstimate.addEmptyWitness()
|
46479
|
-
);
|
45991
|
+
const resources = await this.getResourcesToSpend(missingQuantities, {
|
45992
|
+
messages: cachedMessages,
|
45993
|
+
utxos: cachedUtxos
|
45994
|
+
});
|
45995
|
+
request.addResources(resources);
|
46480
45996
|
}
|
46481
|
-
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46482
|
-
transactionRequest: requestToBeReEstimate
|
46483
|
-
});
|
46484
|
-
txRequest.maxFee = maxFee;
|
46485
|
-
return txRequest;
|
46486
45997
|
}
|
46487
45998
|
/**
|
46488
45999
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -46490,24 +46001,28 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46490
46001
|
* @param destination - The address of the destination.
|
46491
46002
|
* @param amount - The amount of coins to transfer.
|
46492
46003
|
* @param assetId - The asset ID of the coins to transfer.
|
46493
|
-
* @param txParams - The transaction parameters (gasLimit,
|
46004
|
+
* @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
|
46494
46005
|
* @returns A promise that resolves to the prepared transaction request.
|
46495
46006
|
*/
|
46496
46007
|
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46497
|
-
const
|
46008
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
46009
|
+
const params = { gasPrice: minGasPrice, ...txParams };
|
46010
|
+
const request = new ScriptTransactionRequest(params);
|
46498
46011
|
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46499
|
-
const
|
46012
|
+
const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
|
46500
46013
|
estimateTxDependencies: true,
|
46501
46014
|
resourcesOwner: this
|
46502
46015
|
});
|
46503
|
-
|
46504
|
-
|
46505
|
-
|
46506
|
-
|
46016
|
+
request.gasPrice = bn(txParams.gasPrice ?? minGasPrice);
|
46017
|
+
request.gasLimit = bn(txParams.gasLimit ?? gasUsed);
|
46018
|
+
this.validateGas({
|
46019
|
+
gasUsed,
|
46020
|
+
gasPrice: request.gasPrice,
|
46021
|
+
gasLimit: request.gasLimit,
|
46022
|
+
minGasPrice
|
46507
46023
|
});
|
46508
|
-
request
|
46509
|
-
request.
|
46510
|
-
await this.fund(request, txCost);
|
46024
|
+
await this.fund(request, requiredQuantities, maxFee);
|
46025
|
+
request.updatePredicateInputs(estimatedInputs);
|
46511
46026
|
return request;
|
46512
46027
|
}
|
46513
46028
|
/**
|
@@ -46546,29 +46061,31 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46546
46061
|
);
|
46547
46062
|
}
|
46548
46063
|
const contractAddress = Address.fromAddressOrString(contractId);
|
46064
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
46065
|
+
const params = { gasPrice: minGasPrice, ...txParams };
|
46549
46066
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46550
46067
|
hexlifiedContractId: contractAddress.toB256(),
|
46551
46068
|
amountToTransfer: bn(amount),
|
46552
46069
|
assetId
|
46553
46070
|
});
|
46554
46071
|
const request = new ScriptTransactionRequest({
|
46555
|
-
...
|
46072
|
+
...params,
|
46556
46073
|
script,
|
46557
46074
|
scriptData
|
46558
46075
|
});
|
46559
46076
|
request.addContractInputAndOutput(contractAddress);
|
46560
|
-
const
|
46561
|
-
|
46562
|
-
|
46563
|
-
|
46564
|
-
|
46565
|
-
|
46566
|
-
|
46567
|
-
|
46077
|
+
const { maxFee, requiredQuantities, gasUsed } = await this.provider.getTransactionCost(
|
46078
|
+
request,
|
46079
|
+
[{ amount: bn(amount), assetId: String(assetId) }]
|
46080
|
+
);
|
46081
|
+
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46082
|
+
this.validateGas({
|
46083
|
+
gasUsed,
|
46084
|
+
gasPrice: request.gasPrice,
|
46085
|
+
gasLimit: request.gasLimit,
|
46086
|
+
minGasPrice
|
46568
46087
|
});
|
46569
|
-
request
|
46570
|
-
request.maxFee = txCost.maxFee;
|
46571
|
-
await this.fund(request, txCost);
|
46088
|
+
await this.fund(request, requiredQuantities, maxFee);
|
46572
46089
|
return this.sendTransaction(request);
|
46573
46090
|
}
|
46574
46091
|
/**
|
@@ -46580,6 +46097,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46580
46097
|
* @returns A promise that resolves to the transaction response.
|
46581
46098
|
*/
|
46582
46099
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46100
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
46583
46101
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46584
46102
|
const recipientDataArray = arrayify(
|
46585
46103
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46592,18 +46110,21 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46592
46110
|
...recipientDataArray,
|
46593
46111
|
...amountDataArray
|
46594
46112
|
]);
|
46595
|
-
const params = { script, ...txParams };
|
46113
|
+
const params = { script, gasPrice: minGasPrice, ...txParams };
|
46596
46114
|
const request = new ScriptTransactionRequest(params);
|
46597
|
-
const
|
46598
|
-
const
|
46599
|
-
|
46600
|
-
|
46601
|
-
|
46602
|
-
|
46115
|
+
const forwardingQuantities = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46116
|
+
const { requiredQuantities, maxFee, gasUsed } = await this.provider.getTransactionCost(
|
46117
|
+
request,
|
46118
|
+
forwardingQuantities
|
46119
|
+
);
|
46120
|
+
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46121
|
+
this.validateGas({
|
46122
|
+
gasUsed,
|
46123
|
+
gasPrice: request.gasPrice,
|
46124
|
+
gasLimit: request.gasLimit,
|
46125
|
+
minGasPrice
|
46603
46126
|
});
|
46604
|
-
request
|
46605
|
-
request.gasLimit = txCost.gasUsed;
|
46606
|
-
await this.fund(request, txCost);
|
46127
|
+
await this.fund(request, requiredQuantities, maxFee);
|
46607
46128
|
return this.sendTransaction(request);
|
46608
46129
|
}
|
46609
46130
|
async signMessage(message) {
|
@@ -46661,21 +46182,22 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46661
46182
|
}
|
46662
46183
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46663
46184
|
}
|
46664
|
-
|
46665
|
-
txParams: { gasLimit: setGasLimit, maxFee: setMaxFee },
|
46185
|
+
validateGas({
|
46666
46186
|
gasUsed,
|
46667
|
-
|
46187
|
+
gasPrice,
|
46188
|
+
gasLimit,
|
46189
|
+
minGasPrice
|
46668
46190
|
}) {
|
46669
|
-
if (
|
46191
|
+
if (minGasPrice.gt(gasPrice)) {
|
46670
46192
|
throw new FuelError(
|
46671
|
-
ErrorCode.
|
46672
|
-
`Gas
|
46193
|
+
ErrorCode.GAS_PRICE_TOO_LOW,
|
46194
|
+
`Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
|
46673
46195
|
);
|
46674
46196
|
}
|
46675
|
-
if (
|
46197
|
+
if (gasUsed.gt(gasLimit)) {
|
46676
46198
|
throw new FuelError(
|
46677
|
-
ErrorCode.
|
46678
|
-
`
|
46199
|
+
ErrorCode.GAS_LIMIT_TOO_LOW,
|
46200
|
+
`Gas limit '${gasLimit}' is lower than the required: '${gasUsed}'.`
|
46679
46201
|
);
|
46680
46202
|
}
|
46681
46203
|
}
|
@@ -48260,7 +47782,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
48260
47782
|
* @param transactionRequestLike - The transaction request to send.
|
48261
47783
|
* @returns A promise that resolves to the TransactionResponse object.
|
48262
47784
|
*/
|
48263
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
47785
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution } = {}) {
|
48264
47786
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
48265
47787
|
if (estimateTxDependencies) {
|
48266
47788
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -51020,15 +50542,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51020
50542
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
51021
50543
|
wallet.provider
|
51022
50544
|
);
|
51023
|
-
const
|
51024
|
-
|
51025
|
-
|
51026
|
-
|
50545
|
+
const resources = await genesisWallet.getResourcesToSpend(quantities);
|
50546
|
+
const { minGasPrice } = genesisWallet.provider.getGasConfig();
|
50547
|
+
const request = new ScriptTransactionRequest({
|
50548
|
+
gasLimit: 1e4,
|
50549
|
+
gasPrice: minGasPrice
|
51027
50550
|
});
|
51028
|
-
|
51029
|
-
request.
|
51030
|
-
request.maxFee = txCost.maxFee;
|
51031
|
-
await genesisWallet.fund(request, txCost);
|
50551
|
+
request.addResources(resources);
|
50552
|
+
quantities.map(coinQuantityfy).forEach(({ amount, assetId }) => request.addCoinOutput(wallet.address, amount, assetId));
|
51032
50553
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
51033
50554
|
};
|
51034
50555
|
|
@@ -51058,7 +50579,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51058
50579
|
|
51059
50580
|
// src/test-utils/launchNode.ts
|
51060
50581
|
var import_child_process = __require("child_process");
|
51061
|
-
var
|
50582
|
+
var import_crypto21 = __require("crypto");
|
51062
50583
|
var import_fs2 = __require("fs");
|
51063
50584
|
var import_os = __toESM(__require("os"));
|
51064
50585
|
var import_path8 = __toESM(__require("path"));
|
@@ -51099,6 +50620,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51099
50620
|
ip,
|
51100
50621
|
port,
|
51101
50622
|
args = [],
|
50623
|
+
fuelCorePath = void 0,
|
51102
50624
|
useSystemFuelCore = false,
|
51103
50625
|
loggingEnabled = true,
|
51104
50626
|
debugEnabled = false,
|
@@ -51107,19 +50629,19 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51107
50629
|
// eslint-disable-next-line no-async-promise-executor
|
51108
50630
|
new Promise(async (resolve, reject) => {
|
51109
50631
|
const remainingArgs = extractRemainingArgs(args, [
|
51110
|
-
"--
|
50632
|
+
"--chain",
|
51111
50633
|
"--consensus-key",
|
51112
50634
|
"--db-type",
|
51113
50635
|
"--poa-instant"
|
51114
50636
|
]);
|
51115
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
50637
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--chain");
|
51116
50638
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
51117
50639
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
51118
50640
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
51119
50641
|
const poaInstantFlagValue = getFlagValueFromArgs(args, "--poa-instant");
|
51120
50642
|
const poaInstant = poaInstantFlagValue === "true" || poaInstantFlagValue === void 0;
|
51121
50643
|
const graphQLStartSubstring = "Binding GraphQL provider to";
|
51122
|
-
const binPath = findBinPath("fuels-core", __dirname);
|
50644
|
+
const binPath = fuelCorePath ?? findBinPath("fuels-core", __dirname);
|
51123
50645
|
const command = useSystemFuelCore ? "fuel-core" : binPath;
|
51124
50646
|
const ipToUse = ip || "0.0.0.0";
|
51125
50647
|
const portToUse = port || (await (0, import_portfinder.getPortPromise)({
|
@@ -51130,55 +50652,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51130
50652
|
})).toString();
|
51131
50653
|
let chainConfigPathToUse;
|
51132
50654
|
const prefix = basePath || import_os.default.tmpdir();
|
51133
|
-
const suffix = basePath ? "" : (0,
|
51134
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix
|
50655
|
+
const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
|
50656
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51135
50657
|
if (chainConfigPath) {
|
51136
50658
|
chainConfigPathToUse = chainConfigPath;
|
51137
50659
|
} else {
|
51138
50660
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
51139
50661
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
51140
50662
|
}
|
51141
|
-
|
51142
|
-
|
51143
|
-
stateConfigJson = {
|
51144
|
-
...stateConfigJson,
|
51145
|
-
coins: [
|
51146
|
-
...stateConfigJson.coins.map((coin) => ({
|
51147
|
-
...coin,
|
51148
|
-
amount: "18446744073709551615"
|
51149
|
-
}))
|
51150
|
-
],
|
51151
|
-
messages: stateConfigJson.messages.map((message) => ({
|
51152
|
-
...message,
|
51153
|
-
amount: "18446744073709551615"
|
51154
|
-
}))
|
51155
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51156
|
-
};
|
50663
|
+
const tempChainConfigFilePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
50664
|
+
let chainConfig = defaultChainConfig;
|
51157
50665
|
if (!process.env.GENESIS_SECRET) {
|
51158
50666
|
const pk = Signer.generatePrivateKey();
|
51159
50667
|
const signer = new Signer(pk);
|
51160
50668
|
process.env.GENESIS_SECRET = hexlify(pk);
|
51161
|
-
|
51162
|
-
|
51163
|
-
|
51164
|
-
|
51165
|
-
|
51166
|
-
|
51167
|
-
|
51168
|
-
|
51169
|
-
|
51170
|
-
|
50669
|
+
chainConfig = {
|
50670
|
+
...defaultChainConfig,
|
50671
|
+
initial_state: {
|
50672
|
+
...defaultChainConfig.initial_state,
|
50673
|
+
coins: [
|
50674
|
+
...defaultChainConfig.initial_state.coins,
|
50675
|
+
{
|
50676
|
+
owner: signer.address.toHexString(),
|
50677
|
+
amount: toHex(1e9),
|
50678
|
+
asset_id: BaseAssetId
|
50679
|
+
}
|
50680
|
+
]
|
50681
|
+
}
|
50682
|
+
};
|
51171
50683
|
}
|
51172
|
-
|
51173
|
-
|
51174
|
-
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51175
|
-
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51176
|
-
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51177
|
-
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51178
|
-
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51179
|
-
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51180
|
-
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51181
|
-
chainConfigPathToUse = tempDirPath;
|
50684
|
+
(0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(chainConfig), "utf8");
|
50685
|
+
chainConfigPathToUse = tempChainConfigFilePath;
|
51182
50686
|
}
|
51183
50687
|
const child = (0, import_child_process.spawn)(
|
51184
50688
|
command,
|
@@ -51187,10 +50691,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51187
50691
|
["--ip", ipToUse],
|
51188
50692
|
["--port", portToUse],
|
51189
50693
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
51190
|
-
["--min-gas-price", "
|
50694
|
+
["--min-gas-price", "0"],
|
51191
50695
|
poaInstant ? ["--poa-instant", "true"] : [],
|
51192
50696
|
["--consensus-key", consensusKey],
|
51193
|
-
["--
|
50697
|
+
["--chain", chainConfigPathToUse],
|
51194
50698
|
"--vm-backtrace",
|
51195
50699
|
"--utxo-validation",
|
51196
50700
|
"--debug",
|
@@ -51249,7 +50753,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51249
50753
|
walletCount = 10
|
51250
50754
|
} = {}) => {
|
51251
50755
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
51252
|
-
const provider = await Provider.create(`http://${ip}:${port}/
|
50756
|
+
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51253
50757
|
const wallets = await generateWallets(walletCount, provider);
|
51254
50758
|
const cleanup = () => {
|
51255
50759
|
closeNode();
|