@fuel-ts/account 0.0.0-rc-2021-20240411154255 → 0.0.0-rc-2037-20240411163513
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 +4 -5
- 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 +563 -841
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +565 -825
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +400 -659
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +10 -10
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +329 -911
- 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 +1 -2
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -1
- package/dist/providers/message.d.ts +1 -6
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +30 -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 +5 -6
- 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.map +1 -1
- package/dist/test-utils.global.js +1047 -1557
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +543 -800
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +394 -651
- package/dist/test-utils.mjs.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +17 -17
@@ -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.79.0"
|
31920
31920
|
};
|
31921
31921
|
}
|
@@ -32193,757 +32193,524 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32193
32193
|
__publicField3(DateTime, "TAI64_NULL", "");
|
32194
32194
|
var chainConfig_default = {
|
32195
32195
|
chain_name: "local_testnet",
|
32196
|
-
|
32197
|
-
|
32198
|
-
|
32199
|
-
|
32200
|
-
|
32201
|
-
|
32202
|
-
|
32203
|
-
max_gas_per_tx: 3e7,
|
32204
|
-
max_size: 112640
|
32205
|
-
}
|
32206
|
-
},
|
32207
|
-
predicate_params: {
|
32208
|
-
V1: {
|
32209
|
-
max_predicate_length: 102400,
|
32210
|
-
max_predicate_data_length: 102400,
|
32211
|
-
max_message_data_length: 102400,
|
32212
|
-
max_gas_per_predicate: 3e7
|
32213
|
-
}
|
32214
|
-
},
|
32215
|
-
script_params: {
|
32216
|
-
V1: {
|
32217
|
-
max_script_length: 102400,
|
32218
|
-
max_script_data_length: 102400
|
32219
|
-
}
|
32220
|
-
},
|
32221
|
-
contract_params: {
|
32222
|
-
V1: {
|
32223
|
-
contract_max_size: 102400,
|
32224
|
-
max_storage_slots: 1760
|
32225
|
-
}
|
32226
|
-
},
|
32227
|
-
fee_params: {
|
32228
|
-
V1: {
|
32229
|
-
gas_price_factor: 92,
|
32230
|
-
gas_per_byte: 63
|
32231
|
-
}
|
32232
|
-
},
|
32233
|
-
chain_id: 0,
|
32234
|
-
gas_costs: {
|
32235
|
-
V1: {
|
32236
|
-
add: 2,
|
32237
|
-
addi: 2,
|
32238
|
-
aloc: 1,
|
32239
|
-
and: 2,
|
32240
|
-
andi: 2,
|
32241
|
-
bal: 366,
|
32242
|
-
bhei: 2,
|
32243
|
-
bhsh: 2,
|
32244
|
-
burn: 33949,
|
32245
|
-
cb: 2,
|
32246
|
-
cfei: 2,
|
32247
|
-
cfsi: 2,
|
32248
|
-
div: 2,
|
32249
|
-
divi: 2,
|
32250
|
-
eck1: 3347,
|
32251
|
-
ecr1: 46165,
|
32252
|
-
ed19: 4210,
|
32253
|
-
eq: 2,
|
32254
|
-
exp: 2,
|
32255
|
-
expi: 2,
|
32256
|
-
flag: 1,
|
32257
|
-
gm: 2,
|
32258
|
-
gt: 2,
|
32259
|
-
gtf: 16,
|
32260
|
-
ji: 2,
|
32261
|
-
jmp: 2,
|
32262
|
-
jne: 2,
|
32263
|
-
jnei: 2,
|
32264
|
-
jnzi: 2,
|
32265
|
-
jmpf: 2,
|
32266
|
-
jmpb: 2,
|
32267
|
-
jnzf: 2,
|
32268
|
-
jnzb: 2,
|
32269
|
-
jnef: 2,
|
32270
|
-
jneb: 2,
|
32271
|
-
lb: 2,
|
32272
|
-
log: 754,
|
32273
|
-
lt: 2,
|
32274
|
-
lw: 2,
|
32275
|
-
mint: 35718,
|
32276
|
-
mlog: 2,
|
32277
|
-
mod: 2,
|
32278
|
-
modi: 2,
|
32279
|
-
move: 2,
|
32280
|
-
movi: 2,
|
32281
|
-
mroo: 5,
|
32282
|
-
mul: 2,
|
32283
|
-
muli: 2,
|
32284
|
-
mldv: 4,
|
32285
|
-
noop: 1,
|
32286
|
-
not: 2,
|
32287
|
-
or: 2,
|
32288
|
-
ori: 2,
|
32289
|
-
poph: 3,
|
32290
|
-
popl: 3,
|
32291
|
-
pshh: 4,
|
32292
|
-
pshl: 4,
|
32293
|
-
ret_contract: 733,
|
32294
|
-
rvrt_contract: 722,
|
32295
|
-
sb: 2,
|
32296
|
-
sll: 2,
|
32297
|
-
slli: 2,
|
32298
|
-
srl: 2,
|
32299
|
-
srli: 2,
|
32300
|
-
srw: 253,
|
32301
|
-
sub: 2,
|
32302
|
-
subi: 2,
|
32303
|
-
sw: 2,
|
32304
|
-
sww: 29053,
|
32305
|
-
time: 79,
|
32306
|
-
tr: 46242,
|
32307
|
-
tro: 33251,
|
32308
|
-
wdcm: 3,
|
32309
|
-
wqcm: 3,
|
32310
|
-
wdop: 3,
|
32311
|
-
wqop: 3,
|
32312
|
-
wdml: 3,
|
32313
|
-
wqml: 4,
|
32314
|
-
wddv: 5,
|
32315
|
-
wqdv: 7,
|
32316
|
-
wdmd: 11,
|
32317
|
-
wqmd: 18,
|
32318
|
-
wdam: 9,
|
32319
|
-
wqam: 12,
|
32320
|
-
wdmm: 11,
|
32321
|
-
wqmm: 11,
|
32322
|
-
xor: 2,
|
32323
|
-
xori: 2,
|
32324
|
-
call: {
|
32325
|
-
LightOperation: {
|
32326
|
-
base: 21687,
|
32327
|
-
units_per_gas: 4
|
32328
|
-
}
|
32329
|
-
},
|
32330
|
-
ccp: {
|
32331
|
-
LightOperation: {
|
32332
|
-
base: 59,
|
32333
|
-
units_per_gas: 20
|
32334
|
-
}
|
32335
|
-
},
|
32336
|
-
croo: {
|
32337
|
-
LightOperation: {
|
32338
|
-
base: 1,
|
32339
|
-
units_per_gas: 1
|
32340
|
-
}
|
32341
|
-
},
|
32342
|
-
csiz: {
|
32343
|
-
LightOperation: {
|
32344
|
-
base: 59,
|
32345
|
-
units_per_gas: 195
|
32346
|
-
}
|
32347
|
-
},
|
32348
|
-
k256: {
|
32349
|
-
LightOperation: {
|
32350
|
-
base: 282,
|
32351
|
-
units_per_gas: 3
|
32352
|
-
}
|
32353
|
-
},
|
32354
|
-
ldc: {
|
32355
|
-
LightOperation: {
|
32356
|
-
base: 45,
|
32357
|
-
units_per_gas: 65
|
32358
|
-
}
|
32359
|
-
},
|
32360
|
-
logd: {
|
32361
|
-
LightOperation: {
|
32362
|
-
base: 1134,
|
32363
|
-
units_per_gas: 2
|
32364
|
-
}
|
32365
|
-
},
|
32366
|
-
mcl: {
|
32367
|
-
LightOperation: {
|
32368
|
-
base: 3,
|
32369
|
-
units_per_gas: 523
|
32370
|
-
}
|
32371
|
-
},
|
32372
|
-
mcli: {
|
32373
|
-
LightOperation: {
|
32374
|
-
base: 3,
|
32375
|
-
units_per_gas: 526
|
32376
|
-
}
|
32377
|
-
},
|
32378
|
-
mcp: {
|
32379
|
-
LightOperation: {
|
32380
|
-
base: 3,
|
32381
|
-
units_per_gas: 448
|
32382
|
-
}
|
32383
|
-
},
|
32384
|
-
mcpi: {
|
32385
|
-
LightOperation: {
|
32386
|
-
base: 7,
|
32387
|
-
units_per_gas: 585
|
32388
|
-
}
|
32389
|
-
},
|
32390
|
-
meq: {
|
32391
|
-
LightOperation: {
|
32392
|
-
base: 11,
|
32393
|
-
units_per_gas: 1097
|
32394
|
-
}
|
32395
|
-
},
|
32396
|
-
retd_contract: {
|
32397
|
-
LightOperation: {
|
32398
|
-
base: 1086,
|
32399
|
-
units_per_gas: 2
|
32400
|
-
}
|
32401
|
-
},
|
32402
|
-
s256: {
|
32403
|
-
LightOperation: {
|
32404
|
-
base: 45,
|
32405
|
-
units_per_gas: 3
|
32406
|
-
}
|
32407
|
-
},
|
32408
|
-
scwq: {
|
32409
|
-
HeavyOperation: {
|
32410
|
-
base: 30375,
|
32411
|
-
gas_per_unit: 28628
|
32412
|
-
}
|
32413
|
-
},
|
32414
|
-
smo: {
|
32415
|
-
LightOperation: {
|
32416
|
-
base: 64196,
|
32417
|
-
units_per_gas: 1
|
32418
|
-
}
|
32419
|
-
},
|
32420
|
-
srwq: {
|
32421
|
-
HeavyOperation: {
|
32422
|
-
base: 262,
|
32423
|
-
gas_per_unit: 249
|
32424
|
-
}
|
32425
|
-
},
|
32426
|
-
swwq: {
|
32427
|
-
HeavyOperation: {
|
32428
|
-
base: 28484,
|
32429
|
-
gas_per_unit: 26613
|
32430
|
-
}
|
32431
|
-
},
|
32432
|
-
contract_root: {
|
32433
|
-
LightOperation: {
|
32434
|
-
base: 45,
|
32435
|
-
units_per_gas: 1
|
32436
|
-
}
|
32437
|
-
},
|
32438
|
-
state_root: {
|
32439
|
-
HeavyOperation: {
|
32440
|
-
base: 350,
|
32441
|
-
gas_per_unit: 176
|
32442
|
-
}
|
32443
|
-
},
|
32444
|
-
new_storage_per_byte: 63,
|
32445
|
-
vm_initialization: {
|
32446
|
-
LightOperation: {
|
32447
|
-
base: 1645,
|
32448
|
-
units_per_gas: 14
|
32449
|
-
}
|
32450
|
-
}
|
32451
|
-
}
|
32196
|
+
block_gas_limit: 5e9,
|
32197
|
+
initial_state: {
|
32198
|
+
coins: [
|
32199
|
+
{
|
32200
|
+
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32201
|
+
amount: "0xFFFFFFFFFFFFFFFF",
|
32202
|
+
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32452
32203
|
},
|
32453
|
-
|
32454
|
-
|
32455
|
-
|
32456
|
-
|
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
|
+
]
|
32457
32463
|
},
|
32458
|
-
|
32459
|
-
|
32460
|
-
|
32461
|
-
|
32462
|
-
|
32463
|
-
|
32464
|
-
|
32465
|
-
chain_config: "chainConfig.json",
|
32466
|
-
table_encoding: {
|
32467
|
-
Json: {
|
32468
|
-
filepath: "stateConfig.json"
|
32469
|
-
}
|
32470
|
-
}
|
32471
|
-
};
|
32472
|
-
var stateConfig_default = {
|
32473
|
-
coins: [
|
32474
|
-
{
|
32475
|
-
tx_id: "0x260eabfd50937e92939fd92687e9302a72e91c5065f64f853f2ccbe02396fe09d665",
|
32476
|
-
output_index: 0,
|
32477
|
-
tx_pointer_block_height: 0,
|
32478
|
-
tx_pointer_tx_idx: 0,
|
32479
|
-
owner: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
|
32480
|
-
amount: 18446744073709552e3,
|
32481
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32482
|
-
},
|
32483
|
-
{
|
32484
|
-
tx_id: "0x2a757c2317236f7883ac9bbbf7d402f034e0b725c544ef1c8725b1d2bd960f8c690f",
|
32485
|
-
output_index: 0,
|
32486
|
-
tx_pointer_block_height: 0,
|
32487
|
-
tx_pointer_tx_idx: 0,
|
32488
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32489
|
-
amount: 18446744073709552e3,
|
32490
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32491
|
-
},
|
32492
|
-
{
|
32493
|
-
tx_id: "0x634ef6cda00bac63992bbde80c6d694d484d58025a5ca0c9c848f0d35a5a3eee74b2",
|
32494
|
-
output_index: 0,
|
32495
|
-
tx_pointer_block_height: 0,
|
32496
|
-
tx_pointer_tx_idx: 0,
|
32497
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32498
|
-
amount: 18446744073709552e3,
|
32499
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32500
|
-
},
|
32501
|
-
{
|
32502
|
-
tx_id: "0xd3543bb1da137a7987a96a1bb71681fdd195ff25318c0d4a923aa30eb27ffa80bc7b",
|
32503
|
-
output_index: 0,
|
32504
|
-
tx_pointer_block_height: 0,
|
32505
|
-
tx_pointer_tx_idx: 0,
|
32506
|
-
owner: "0x09c0b2d1a486c439a87bcba6b46a7a1a23f3897cc83a94521a96da5c23bc58db",
|
32507
|
-
amount: 18446744073709552e3,
|
32508
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32509
|
-
},
|
32510
|
-
{
|
32511
|
-
tx_id: "0xa4d42cbb02adb32f5f3a9eab33a0ee7bdab8910ad9f615dfc86a7bb9e49a732bc58c",
|
32512
|
-
output_index: 0,
|
32513
|
-
tx_pointer_block_height: 0,
|
32514
|
-
tx_pointer_tx_idx: 0,
|
32515
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32516
|
-
amount: 18446744073709552e3,
|
32517
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32518
|
-
},
|
32519
|
-
{
|
32520
|
-
tx_id: "0xc197cb09b1d89a7862b238e9500631bd43f291aadb7ff55c8129335349634e9fde3f",
|
32521
|
-
output_index: 0,
|
32522
|
-
tx_pointer_block_height: 0,
|
32523
|
-
tx_pointer_tx_idx: 0,
|
32524
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32525
|
-
amount: 18446744073709552e3,
|
32526
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32527
|
-
},
|
32528
|
-
{
|
32529
|
-
tx_id: "0x4c4fc2451b9a9b16c520c1b89ec8968ce46823dd0396d84f7e3155861352fdce12c5",
|
32530
|
-
output_index: 0,
|
32531
|
-
tx_pointer_block_height: 0,
|
32532
|
-
tx_pointer_tx_idx: 0,
|
32533
|
-
owner: "0x5d99ee966b42cd8fc7bdd1364b389153a9e78b42b7d4a691470674e817888d4e",
|
32534
|
-
amount: 18446744073709552e3,
|
32535
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32536
|
-
},
|
32537
|
-
{
|
32538
|
-
tx_id: "0x68df8f08555086a1ab45591e6fe4bf2f538bcb80dd519108030b7e886d6a230c2531",
|
32539
|
-
output_index: 0,
|
32540
|
-
tx_pointer_block_height: 0,
|
32541
|
-
tx_pointer_tx_idx: 0,
|
32542
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32543
|
-
amount: 18446744073709552e3,
|
32544
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32545
|
-
},
|
32546
|
-
{
|
32547
|
-
tx_id: "0x1b9bdaa290518373eb905e45ce7fcb89acedd24341ca7749ad47a938e4bf3ca9b7ce",
|
32548
|
-
output_index: 0,
|
32549
|
-
tx_pointer_block_height: 0,
|
32550
|
-
tx_pointer_tx_idx: 0,
|
32551
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32552
|
-
amount: 18446744073709552e3,
|
32553
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32554
|
-
},
|
32555
|
-
{
|
32556
|
-
tx_id: "0xa5a2e9db3d1285337fe1183dc1eabe8f9cdcd470daf95cd5c522bbae292f53977f26",
|
32557
|
-
output_index: 0,
|
32558
|
-
tx_pointer_block_height: 0,
|
32559
|
-
tx_pointer_tx_idx: 0,
|
32560
|
-
owner: "0xbdaad6a89e073e177895b3e5a9ccd15806749eda134a6438dae32fc5b6601f3f",
|
32561
|
-
amount: 18446744073709552e3,
|
32562
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32563
|
-
},
|
32564
|
-
{
|
32565
|
-
tx_id: "0x13b685a1ea7c56309a92d69dd7e4808987ec90d62a1f9c9f2ec18e54746855c8c93c",
|
32566
|
-
output_index: 0,
|
32567
|
-
tx_pointer_block_height: 0,
|
32568
|
-
tx_pointer_tx_idx: 0,
|
32569
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32570
|
-
amount: 18446744073709552e3,
|
32571
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32572
|
-
},
|
32573
|
-
{
|
32574
|
-
tx_id: "0xf8f00a234cf3fbab86befc3fd9346d7fd1ac085233c9cb58c7447f30c75cbf87ed38",
|
32575
|
-
output_index: 0,
|
32576
|
-
tx_pointer_block_height: 0,
|
32577
|
-
tx_pointer_tx_idx: 0,
|
32578
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32579
|
-
amount: 18446744073709552e3,
|
32580
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32581
|
-
},
|
32582
|
-
{
|
32583
|
-
tx_id: "0x2a36c870f624b60fbd6f2b71332ca7f704c69296ceae4ddbf3a8ede79408088934be",
|
32584
|
-
output_index: 0,
|
32585
|
-
tx_pointer_block_height: 0,
|
32586
|
-
tx_pointer_tx_idx: 0,
|
32587
|
-
owner: "0x95a7aa6cc32743f8706c40ef49a7423b47da763bb4bbc055b1f07254dc729036",
|
32588
|
-
amount: 18446744073709552e3,
|
32589
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32590
|
-
},
|
32591
|
-
{
|
32592
|
-
tx_id: "0x9cd180d41e67a422da8a7683f036b463a7ed7efc0de31c1692adac90decbfebce78c",
|
32593
|
-
output_index: 0,
|
32594
|
-
tx_pointer_block_height: 0,
|
32595
|
-
tx_pointer_tx_idx: 0,
|
32596
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32597
|
-
amount: 18446744073709552e3,
|
32598
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32599
|
-
},
|
32600
|
-
{
|
32601
|
-
tx_id: "0xfeb4f2388fa22e6613ff85cf4e655f58acdfaa6299eba7f93b812cd1f0d7bbac48f0",
|
32602
|
-
output_index: 0,
|
32603
|
-
tx_pointer_block_height: 0,
|
32604
|
-
tx_pointer_tx_idx: 0,
|
32605
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32606
|
-
amount: 18446744073709552e3,
|
32607
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32608
|
-
},
|
32609
|
-
{
|
32610
|
-
tx_id: "0xc4d20299f43358dc32ab853f6631340b09278511b6adbaf34597ade6ef37efd018f1",
|
32611
|
-
output_index: 0,
|
32612
|
-
tx_pointer_block_height: 0,
|
32613
|
-
tx_pointer_tx_idx: 0,
|
32614
|
-
owner: "0xcee104acd38b940c8f1c62c6d7ea00a0ad2241d6dee0509a4bf27297508870d3",
|
32615
|
-
amount: 18446744073709552e3,
|
32616
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32617
|
-
},
|
32618
|
-
{
|
32619
|
-
tx_id: "0x437291414110b0aebaa8be5c0d9ff1e97d1130a24a6c9e028f2b1f6b0576be6aa961",
|
32620
|
-
output_index: 0,
|
32621
|
-
tx_pointer_block_height: 0,
|
32622
|
-
tx_pointer_tx_idx: 0,
|
32623
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32624
|
-
amount: 18446744073709552e3,
|
32625
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32626
|
-
},
|
32627
|
-
{
|
32628
|
-
tx_id: "0x28131b9acc90c2058ee14f4094a474146ba5b779cb9021867164b3d41abad3d047a7",
|
32629
|
-
output_index: 0,
|
32630
|
-
tx_pointer_block_height: 0,
|
32631
|
-
tx_pointer_tx_idx: 0,
|
32632
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32633
|
-
amount: 18446744073709552e3,
|
32634
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32635
|
-
},
|
32636
|
-
{
|
32637
|
-
tx_id: "0x033bb5f9b0e4f530d50af3a0f12dd510f799af495ef88baea3cf854a37da728d214b",
|
32638
|
-
output_index: 0,
|
32639
|
-
tx_pointer_block_height: 0,
|
32640
|
-
tx_pointer_tx_idx: 0,
|
32641
|
-
owner: "0x7e3626e306588eba79cafab73f0709e55ab8f4bdfe8c8b75034a430fc56ece89",
|
32642
|
-
amount: 18446744073709552e3,
|
32643
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32644
|
-
},
|
32645
|
-
{
|
32646
|
-
tx_id: "0x460591398552eca338dd9577f362b91b0f9297f308258734870350004dcc303c67e9",
|
32647
|
-
output_index: 0,
|
32648
|
-
tx_pointer_block_height: 0,
|
32649
|
-
tx_pointer_tx_idx: 0,
|
32650
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32651
|
-
amount: 18446744073709552e3,
|
32652
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32653
|
-
},
|
32654
|
-
{
|
32655
|
-
tx_id: "0x447a7c37aee972dcba72f05255c5145dd63125f0fc46ef98c216f775ee0421e23d2b",
|
32656
|
-
output_index: 0,
|
32657
|
-
tx_pointer_block_height: 0,
|
32658
|
-
tx_pointer_tx_idx: 0,
|
32659
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32660
|
-
amount: 18446744073709552e3,
|
32661
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32662
|
-
},
|
32663
|
-
{
|
32664
|
-
tx_id: "0xf4a5d727606260c7ac6333fa89e7aef474df8a13326716d4d02f6392ebb7b997d268",
|
32665
|
-
output_index: 0,
|
32666
|
-
tx_pointer_block_height: 0,
|
32667
|
-
tx_pointer_tx_idx: 0,
|
32668
|
-
owner: "0x1c31df52b6df56407dd95f83082e8beb9cfc9532ac111d5bd8491651d95ba775",
|
32669
|
-
amount: 18446744073709552e3,
|
32670
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32671
|
-
},
|
32672
|
-
{
|
32673
|
-
tx_id: "0x25a49b0731bf610f6706aa9e9e96e5967f7c50f4302a3c75d7c8141595896551c18d",
|
32674
|
-
output_index: 0,
|
32675
|
-
tx_pointer_block_height: 0,
|
32676
|
-
tx_pointer_tx_idx: 0,
|
32677
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32678
|
-
amount: 18446744073709552e3,
|
32679
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32680
|
-
},
|
32681
|
-
{
|
32682
|
-
tx_id: "0x0a6e3585881ef2edf3f7727762799089dc0b5923e8b3718b49044dd9ddcb33b68459",
|
32683
|
-
output_index: 0,
|
32684
|
-
tx_pointer_block_height: 0,
|
32685
|
-
tx_pointer_tx_idx: 0,
|
32686
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32687
|
-
amount: 18446744073709552e3,
|
32688
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32689
|
-
},
|
32690
|
-
{
|
32691
|
-
tx_id: "0xf73bbe0635f7b6d59a090a21d87288b82164d0f6101da830ce64eff64a2d2ff2ac37",
|
32692
|
-
output_index: 0,
|
32693
|
-
tx_pointer_block_height: 0,
|
32694
|
-
tx_pointer_tx_idx: 0,
|
32695
|
-
owner: "0x09dd7a49174d6fcc9f4c6f7942c18060a935ddd03ee69b594189b8c3581276ea",
|
32696
|
-
amount: 18446744073709552e3,
|
32697
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32698
|
-
},
|
32699
|
-
{
|
32700
|
-
tx_id: "0x6cc44cb8d2a6462a591a77b6b9917eb6b22ad80d23d3cfd4f94c9da49c14b3cbac6e",
|
32701
|
-
output_index: 0,
|
32702
|
-
tx_pointer_block_height: 0,
|
32703
|
-
tx_pointer_tx_idx: 0,
|
32704
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32705
|
-
amount: 18446744073709552e3,
|
32706
|
-
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
|
32707
32471
|
},
|
32708
|
-
{
|
32709
|
-
|
32710
|
-
|
32711
|
-
|
32712
|
-
|
32713
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32714
|
-
amount: 18446744073709552e3,
|
32715
|
-
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
|
32716
32477
|
},
|
32717
|
-
{
|
32718
|
-
|
32719
|
-
|
32720
|
-
tx_pointer_block_height: 0,
|
32721
|
-
tx_pointer_tx_idx: 0,
|
32722
|
-
owner: "0x86604282dc604481b809845be49667607c470644f6822fc01eb0d22f167e08cf",
|
32723
|
-
amount: 18446744073709552e3,
|
32724
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32478
|
+
script_params: {
|
32479
|
+
max_script_length: 1048576,
|
32480
|
+
max_script_data_length: 1048576
|
32725
32481
|
},
|
32726
|
-
{
|
32727
|
-
|
32728
|
-
|
32729
|
-
tx_pointer_block_height: 0,
|
32730
|
-
tx_pointer_tx_idx: 0,
|
32731
|
-
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32732
|
-
amount: 18446744073709552e3,
|
32733
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32482
|
+
contract_params: {
|
32483
|
+
contract_max_size: 16777216,
|
32484
|
+
max_storage_slots: 255
|
32734
32485
|
},
|
32735
|
-
{
|
32736
|
-
|
32737
|
-
|
32738
|
-
|
32739
|
-
|
32740
|
-
|
32741
|
-
|
32742
|
-
|
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
|
+
}
|
32743
32586
|
},
|
32744
|
-
{
|
32745
|
-
|
32746
|
-
|
32747
|
-
|
32748
|
-
|
32749
|
-
owner: "0xbca334a06d19db5041c78fe2f465b07be5bec828f38b7796b2877e7d1542c950",
|
32750
|
-
amount: 18446744073709552e3,
|
32751
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32587
|
+
ccp: {
|
32588
|
+
LightOperation: {
|
32589
|
+
base: 15,
|
32590
|
+
units_per_gas: 103
|
32591
|
+
}
|
32752
32592
|
},
|
32753
|
-
{
|
32754
|
-
|
32755
|
-
|
32756
|
-
|
32757
|
-
|
32758
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32759
|
-
amount: 18446744073709552e3,
|
32760
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32593
|
+
csiz: {
|
32594
|
+
LightOperation: {
|
32595
|
+
base: 17,
|
32596
|
+
units_per_gas: 790
|
32597
|
+
}
|
32761
32598
|
},
|
32762
|
-
{
|
32763
|
-
|
32764
|
-
|
32765
|
-
|
32766
|
-
|
32767
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32768
|
-
amount: 18446744073709552e3,
|
32769
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32599
|
+
k256: {
|
32600
|
+
LightOperation: {
|
32601
|
+
base: 11,
|
32602
|
+
units_per_gas: 214
|
32603
|
+
}
|
32770
32604
|
},
|
32771
|
-
{
|
32772
|
-
|
32773
|
-
|
32774
|
-
|
32775
|
-
|
32776
|
-
owner: "0xbd9a1dc8d3ec3521c43f6c2c01611b4d0204c7610204ff0178488c8738a30bd2",
|
32777
|
-
amount: 18446744073709552e3,
|
32778
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32605
|
+
ldc: {
|
32606
|
+
LightOperation: {
|
32607
|
+
base: 15,
|
32608
|
+
units_per_gas: 272
|
32609
|
+
}
|
32779
32610
|
},
|
32780
|
-
{
|
32781
|
-
|
32782
|
-
|
32783
|
-
|
32784
|
-
|
32785
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32786
|
-
amount: 18446744073709552e3,
|
32787
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32611
|
+
logd: {
|
32612
|
+
LightOperation: {
|
32613
|
+
base: 26,
|
32614
|
+
units_per_gas: 64
|
32615
|
+
}
|
32788
32616
|
},
|
32789
|
-
{
|
32790
|
-
|
32791
|
-
|
32792
|
-
|
32793
|
-
|
32794
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32795
|
-
amount: 18446744073709552e3,
|
32796
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32617
|
+
mcl: {
|
32618
|
+
LightOperation: {
|
32619
|
+
base: 1,
|
32620
|
+
units_per_gas: 3333
|
32621
|
+
}
|
32797
32622
|
},
|
32798
|
-
{
|
32799
|
-
|
32800
|
-
|
32801
|
-
|
32802
|
-
|
32803
|
-
owner: "0xb32197cf75efe05bf453c26178139f09b391582065549c1422bc92555ecffb64",
|
32804
|
-
amount: 18446744073709552e3,
|
32805
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32623
|
+
mcli: {
|
32624
|
+
LightOperation: {
|
32625
|
+
base: 1,
|
32626
|
+
units_per_gas: 3333
|
32627
|
+
}
|
32806
32628
|
},
|
32807
|
-
{
|
32808
|
-
|
32809
|
-
|
32810
|
-
|
32811
|
-
|
32812
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32813
|
-
amount: 18446744073709552e3,
|
32814
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32629
|
+
mcp: {
|
32630
|
+
LightOperation: {
|
32631
|
+
base: 1,
|
32632
|
+
units_per_gas: 2e3
|
32633
|
+
}
|
32815
32634
|
},
|
32816
|
-
{
|
32817
|
-
|
32818
|
-
|
32819
|
-
|
32820
|
-
|
32821
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32822
|
-
amount: 18446744073709552e3,
|
32823
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32635
|
+
mcpi: {
|
32636
|
+
LightOperation: {
|
32637
|
+
base: 3,
|
32638
|
+
units_per_gas: 2e3
|
32639
|
+
}
|
32824
32640
|
},
|
32825
|
-
{
|
32826
|
-
|
32827
|
-
|
32828
|
-
|
32829
|
-
|
32830
|
-
owner: "0x3b24509ed4ab3c7959f5c9391c1445c59290cdb5f13d6f780922f376b7029f30",
|
32831
|
-
amount: 18446744073709552e3,
|
32832
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32641
|
+
meq: {
|
32642
|
+
LightOperation: {
|
32643
|
+
base: 1,
|
32644
|
+
units_per_gas: 2500
|
32645
|
+
}
|
32833
32646
|
},
|
32834
|
-
{
|
32835
|
-
|
32836
|
-
|
32837
|
-
|
32838
|
-
|
32839
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32840
|
-
amount: 18446744073709552e3,
|
32841
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32647
|
+
retd: {
|
32648
|
+
LightOperation: {
|
32649
|
+
base: 29,
|
32650
|
+
units_per_gas: 62
|
32651
|
+
}
|
32842
32652
|
},
|
32843
|
-
{
|
32844
|
-
|
32845
|
-
|
32846
|
-
|
32847
|
-
|
32848
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32849
|
-
amount: 18446744073709552e3,
|
32850
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32653
|
+
s256: {
|
32654
|
+
LightOperation: {
|
32655
|
+
base: 2,
|
32656
|
+
units_per_gas: 214
|
32657
|
+
}
|
32851
32658
|
},
|
32852
|
-
{
|
32853
|
-
|
32854
|
-
|
32855
|
-
|
32856
|
-
|
32857
|
-
owner: "0x77c6f40b7da70d885f68efaad7c661327482a63ea10dcb4271de819438254ae1",
|
32858
|
-
amount: 18446744073709552e3,
|
32859
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32659
|
+
scwq: {
|
32660
|
+
LightOperation: {
|
32661
|
+
base: 13,
|
32662
|
+
units_per_gas: 5
|
32663
|
+
}
|
32860
32664
|
},
|
32861
|
-
{
|
32862
|
-
|
32863
|
-
|
32864
|
-
|
32865
|
-
|
32866
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32867
|
-
amount: 18446744073709552e3,
|
32868
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32665
|
+
smo: {
|
32666
|
+
LightOperation: {
|
32667
|
+
base: 209,
|
32668
|
+
units_per_gas: 55
|
32669
|
+
}
|
32869
32670
|
},
|
32870
|
-
{
|
32871
|
-
|
32872
|
-
|
32873
|
-
|
32874
|
-
|
32875
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32876
|
-
amount: 18446744073709552e3,
|
32877
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32671
|
+
srwq: {
|
32672
|
+
LightOperation: {
|
32673
|
+
base: 47,
|
32674
|
+
units_per_gas: 5
|
32675
|
+
}
|
32878
32676
|
},
|
32879
|
-
{
|
32880
|
-
|
32881
|
-
|
32882
|
-
|
32883
|
-
|
32884
|
-
owner: "0x6a2c4691c547c43924650dbd30620b184b5fe3fb6dbe5c4446110b08f6f405bf",
|
32885
|
-
amount: 18446744073709552e3,
|
32886
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32677
|
+
swwq: {
|
32678
|
+
LightOperation: {
|
32679
|
+
base: 44,
|
32680
|
+
units_per_gas: 5
|
32681
|
+
}
|
32887
32682
|
},
|
32888
|
-
{
|
32889
|
-
|
32890
|
-
|
32891
|
-
|
32892
|
-
|
32893
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32894
|
-
amount: 18446744073709552e3,
|
32895
|
-
asset_id: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
32683
|
+
contract_root: {
|
32684
|
+
LightOperation: {
|
32685
|
+
base: 75,
|
32686
|
+
units_per_gas: 1
|
32687
|
+
}
|
32896
32688
|
},
|
32897
|
-
{
|
32898
|
-
|
32899
|
-
|
32900
|
-
|
32901
|
-
|
32902
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32903
|
-
amount: 18446744073709552e3,
|
32904
|
-
asset_id: "0x0101010101010101010101010101010101010101010101010101010101010101"
|
32689
|
+
state_root: {
|
32690
|
+
LightOperation: {
|
32691
|
+
base: 412,
|
32692
|
+
units_per_gas: 1
|
32693
|
+
}
|
32905
32694
|
},
|
32906
|
-
{
|
32907
|
-
|
32908
|
-
|
32909
|
-
|
32910
|
-
|
32911
|
-
owner: "0x49075a7538e2c88ebe1926ce4d898198a2a4e790d14512943a9864bc536b3c82",
|
32912
|
-
amount: 18446744073709552e3,
|
32913
|
-
asset_id: "0x0202020202020202020202020202020202020202020202020202020202020202"
|
32914
|
-
}
|
32915
|
-
],
|
32916
|
-
messages: [
|
32917
|
-
{
|
32918
|
-
sender: "0xc43454aa38dd91f88109a4b7aef5efb96ce34e3f24992fe0f81d233ca686f80f",
|
32919
|
-
recipient: "0x69a2b736b60159b43bb8a4f98c0589f6da5fa3a3d101e8e269c499eb942753ba",
|
32920
|
-
nonce: "0101010101010101010101010101010101010101010101010101010101010101",
|
32921
|
-
amount: 18446744073709552e3,
|
32922
|
-
data: "",
|
32923
|
-
da_height: 0
|
32695
|
+
vm_initialization: {
|
32696
|
+
HeavyOperation: {
|
32697
|
+
base: 2e3,
|
32698
|
+
gas_per_unit: 0
|
32699
|
+
}
|
32924
32700
|
},
|
32925
|
-
|
32926
|
-
|
32927
|
-
|
32928
|
-
|
32929
|
-
|
32930
|
-
data: "",
|
32931
|
-
da_height: 0
|
32701
|
+
new_storage_per_byte: 1
|
32702
|
+
},
|
32703
|
+
consensus: {
|
32704
|
+
PoA: {
|
32705
|
+
signing_key: "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d"
|
32932
32706
|
}
|
32933
|
-
|
32934
|
-
contracts: [],
|
32935
|
-
block_height: 0,
|
32936
|
-
da_block_height: 0
|
32937
|
-
};
|
32938
|
-
var defaultChainConfigs = {
|
32939
|
-
chainConfigJson: chainConfig_default,
|
32940
|
-
metadataJson: metadata_default,
|
32941
|
-
stateConfigJson: stateConfig_default
|
32707
|
+
}
|
32942
32708
|
};
|
32709
|
+
var defaultChainConfig = chainConfig_default;
|
32943
32710
|
var defaultConsensusKey = "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298";
|
32944
32711
|
|
32945
32712
|
// ../crypto/dist/index.mjs
|
32946
|
-
var
|
32713
|
+
var import_crypto8 = __toESM(__require("crypto"), 1);
|
32947
32714
|
|
32948
32715
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/_version.js
|
32949
32716
|
var version = "6.7.1";
|
@@ -34015,27 +33782,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34015
33782
|
};
|
34016
33783
|
Object.freeze(pbkdf22);
|
34017
33784
|
|
34018
|
-
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/crypto/random.js
|
34019
|
-
var locked5 = false;
|
34020
|
-
var _randomBytes = function(length) {
|
34021
|
-
return new Uint8Array((0, import_crypto2.randomBytes)(length));
|
34022
|
-
};
|
34023
|
-
var __randomBytes = _randomBytes;
|
34024
|
-
function randomBytes3(length) {
|
34025
|
-
return __randomBytes(length);
|
34026
|
-
}
|
34027
|
-
randomBytes3._ = _randomBytes;
|
34028
|
-
randomBytes3.lock = function() {
|
34029
|
-
locked5 = true;
|
34030
|
-
};
|
34031
|
-
randomBytes3.register = function(func) {
|
34032
|
-
if (locked5) {
|
34033
|
-
throw new Error("randomBytes is locked");
|
34034
|
-
}
|
34035
|
-
__randomBytes = func;
|
34036
|
-
};
|
34037
|
-
Object.freeze(randomBytes3);
|
34038
|
-
|
34039
33785
|
// ../../node_modules/.pnpm/ethers@6.7.1/node_modules/ethers/lib.esm/address/address.js
|
34040
33786
|
var BN_03 = BigInt(0);
|
34041
33787
|
var BN_36 = BigInt(36);
|
@@ -34620,8 +34366,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34620
34366
|
}
|
34621
34367
|
|
34622
34368
|
// ../crypto/dist/index.mjs
|
34369
|
+
var import_crypto9 = __toESM(__require("crypto"), 1);
|
34623
34370
|
var import_crypto10 = __toESM(__require("crypto"), 1);
|
34624
|
-
var import_crypto11 = __toESM(__require("crypto"), 1);
|
34625
34371
|
var scrypt3 = (params) => {
|
34626
34372
|
const { password, salt, n, p, r, dklen } = params;
|
34627
34373
|
const derivedKey = scrypt(password, salt, { N: n, r, p, dkLen: dklen });
|
@@ -34630,7 +34376,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34630
34376
|
var keccak2562 = (data) => keccak_256(data);
|
34631
34377
|
var bufferFromString = (string, encoding = "base64") => Uint8Array.from(Buffer.from(string, encoding));
|
34632
34378
|
var randomBytes4 = (length) => {
|
34633
|
-
const randomValues = Uint8Array.from(
|
34379
|
+
const randomValues = Uint8Array.from(import_crypto9.default.randomBytes(length));
|
34634
34380
|
return randomValues;
|
34635
34381
|
};
|
34636
34382
|
var stringFromBuffer = (buffer, encoding = "base64") => Buffer.from(buffer).toString(encoding);
|
@@ -34645,7 +34391,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34645
34391
|
const salt = randomBytes4(32);
|
34646
34392
|
const secret = keyFromPassword(password, salt);
|
34647
34393
|
const dataBuffer = Uint8Array.from(Buffer.from(JSON.stringify(data), "utf-8"));
|
34648
|
-
const cipher = await
|
34394
|
+
const cipher = await import_crypto8.default.createCipheriv(ALGORITHM, secret, iv);
|
34649
34395
|
let cipherData = cipher.update(dataBuffer);
|
34650
34396
|
cipherData = Buffer.concat([cipherData, cipher.final()]);
|
34651
34397
|
return {
|
@@ -34659,7 +34405,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34659
34405
|
const salt = bufferFromString(keystore.salt);
|
34660
34406
|
const secret = keyFromPassword(password, salt);
|
34661
34407
|
const encryptedText = bufferFromString(keystore.data);
|
34662
|
-
const decipher = await
|
34408
|
+
const decipher = await import_crypto8.default.createDecipheriv(ALGORITHM, secret, iv);
|
34663
34409
|
const decrypted = decipher.update(encryptedText);
|
34664
34410
|
const deBuff = Buffer.concat([decrypted, decipher.final()]);
|
34665
34411
|
const decryptedData = Buffer.from(deBuff).toString("utf-8");
|
@@ -34670,12 +34416,12 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34670
34416
|
}
|
34671
34417
|
};
|
34672
34418
|
async function encryptJsonWalletData(data, key, iv) {
|
34673
|
-
const cipher = await
|
34419
|
+
const cipher = await import_crypto10.default.createCipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34674
34420
|
const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
|
34675
34421
|
return new Uint8Array(encrypted);
|
34676
34422
|
}
|
34677
34423
|
async function decryptJsonWalletData(data, key, iv) {
|
34678
|
-
const decipher =
|
34424
|
+
const decipher = import_crypto10.default.createDecipheriv("aes-128-ctr", key.subarray(0, 16), iv);
|
34679
34425
|
const decrypted = await Buffer.concat([decipher.update(data), decipher.final()]);
|
34680
34426
|
return new Uint8Array(decrypted);
|
34681
34427
|
}
|
@@ -35232,182 +34978,32 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35232
34978
|
function toBytes3(value, bytesPadding) {
|
35233
34979
|
return bn(value).toBytes(bytesPadding);
|
35234
34980
|
}
|
35235
|
-
|
35236
|
-
|
35237
|
-
function _isPlaceholder(a) {
|
35238
|
-
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
35239
|
-
}
|
35240
|
-
|
35241
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
35242
|
-
function _curry1(fn) {
|
35243
|
-
return function f1(a) {
|
35244
|
-
if (arguments.length === 0 || _isPlaceholder(a)) {
|
35245
|
-
return f1;
|
35246
|
-
} else {
|
35247
|
-
return fn.apply(this, arguments);
|
35248
|
-
}
|
35249
|
-
};
|
35250
|
-
}
|
35251
|
-
|
35252
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
35253
|
-
var isArray_default = Array.isArray || function _isArray(val) {
|
35254
|
-
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
35255
|
-
};
|
35256
|
-
|
35257
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
35258
|
-
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
35259
|
-
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
35260
|
-
});
|
35261
|
-
var type_default = type;
|
35262
|
-
|
35263
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
35264
|
-
var pad = function pad2(n) {
|
35265
|
-
return (n < 10 ? "0" : "") + n;
|
35266
|
-
};
|
35267
|
-
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
35268
|
-
return d.toISOString();
|
35269
|
-
} : function _toISOString3(d) {
|
35270
|
-
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";
|
35271
|
-
};
|
35272
|
-
|
35273
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
35274
|
-
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
35275
|
-
return n << 0 === n;
|
35276
|
-
};
|
35277
|
-
|
35278
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
35279
|
-
function _cloneRegExp(pattern) {
|
35280
|
-
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" : ""));
|
35281
|
-
}
|
35282
|
-
|
35283
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
35284
|
-
function _clone(value, deep, map) {
|
35285
|
-
map || (map = new _ObjectMap());
|
35286
|
-
if (_isPrimitive(value)) {
|
35287
|
-
return value;
|
35288
|
-
}
|
35289
|
-
var copy = function copy2(copiedValue) {
|
35290
|
-
var cachedCopy = map.get(value);
|
35291
|
-
if (cachedCopy) {
|
35292
|
-
return cachedCopy;
|
35293
|
-
}
|
35294
|
-
map.set(value, copiedValue);
|
35295
|
-
for (var key in value) {
|
35296
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
35297
|
-
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
35298
|
-
}
|
35299
|
-
}
|
35300
|
-
return copiedValue;
|
35301
|
-
};
|
35302
|
-
switch (type_default(value)) {
|
35303
|
-
case "Object":
|
35304
|
-
return copy(Object.create(Object.getPrototypeOf(value)));
|
35305
|
-
case "Array":
|
35306
|
-
return copy([]);
|
35307
|
-
case "Date":
|
35308
|
-
return new Date(value.valueOf());
|
35309
|
-
case "RegExp":
|
35310
|
-
return _cloneRegExp(value);
|
35311
|
-
case "Int8Array":
|
35312
|
-
case "Uint8Array":
|
35313
|
-
case "Uint8ClampedArray":
|
35314
|
-
case "Int16Array":
|
35315
|
-
case "Uint16Array":
|
35316
|
-
case "Int32Array":
|
35317
|
-
case "Uint32Array":
|
35318
|
-
case "Float32Array":
|
35319
|
-
case "Float64Array":
|
35320
|
-
case "BigInt64Array":
|
35321
|
-
case "BigUint64Array":
|
35322
|
-
return value.slice();
|
35323
|
-
default:
|
35324
|
-
return value;
|
35325
|
-
}
|
35326
|
-
}
|
35327
|
-
function _isPrimitive(param) {
|
35328
|
-
var type3 = typeof param;
|
35329
|
-
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));
|
35330
34983
|
}
|
35331
|
-
var _ObjectMap = /* @__PURE__ */ function() {
|
35332
|
-
function _ObjectMap2() {
|
35333
|
-
this.map = {};
|
35334
|
-
this.length = 0;
|
35335
|
-
}
|
35336
|
-
_ObjectMap2.prototype.set = function(key, value) {
|
35337
|
-
const hashedKey = this.hash(key);
|
35338
|
-
let bucket = this.map[hashedKey];
|
35339
|
-
if (!bucket) {
|
35340
|
-
this.map[hashedKey] = bucket = [];
|
35341
|
-
}
|
35342
|
-
bucket.push([key, value]);
|
35343
|
-
this.length += 1;
|
35344
|
-
};
|
35345
|
-
_ObjectMap2.prototype.hash = function(key) {
|
35346
|
-
let hashedKey = [];
|
35347
|
-
for (var value in key) {
|
35348
|
-
hashedKey.push(Object.prototype.toString.call(key[value]));
|
35349
|
-
}
|
35350
|
-
return hashedKey.join();
|
35351
|
-
};
|
35352
|
-
_ObjectMap2.prototype.get = function(key) {
|
35353
|
-
if (this.length <= 180) {
|
35354
|
-
for (const p in this.map) {
|
35355
|
-
const bucket2 = this.map[p];
|
35356
|
-
for (let i = 0; i < bucket2.length; i += 1) {
|
35357
|
-
const element = bucket2[i];
|
35358
|
-
if (element[0] === key) {
|
35359
|
-
return element[1];
|
35360
|
-
}
|
35361
|
-
}
|
35362
|
-
}
|
35363
|
-
return;
|
35364
|
-
}
|
35365
|
-
const hashedKey = this.hash(key);
|
35366
|
-
const bucket = this.map[hashedKey];
|
35367
|
-
if (!bucket) {
|
35368
|
-
return;
|
35369
|
-
}
|
35370
|
-
for (let i = 0; i < bucket.length; i += 1) {
|
35371
|
-
const element = bucket[i];
|
35372
|
-
if (element[0] === key) {
|
35373
|
-
return element[1];
|
35374
|
-
}
|
35375
|
-
}
|
35376
|
-
};
|
35377
|
-
return _ObjectMap2;
|
35378
|
-
}();
|
35379
|
-
|
35380
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
35381
|
-
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
35382
|
-
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
35383
|
-
});
|
35384
|
-
var clone_default = clone;
|
35385
|
-
|
35386
|
-
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
35387
|
-
var hasProtoTrim = typeof String.prototype.trim === "function";
|
35388
34984
|
|
35389
34985
|
// src/providers/coin-quantity.ts
|
35390
34986
|
var coinQuantityfy = (coinQuantityLike) => {
|
35391
34987
|
let assetId;
|
35392
34988
|
let amount;
|
35393
|
-
let
|
34989
|
+
let max2;
|
35394
34990
|
if (Array.isArray(coinQuantityLike)) {
|
35395
34991
|
amount = coinQuantityLike[0];
|
35396
34992
|
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
35397
|
-
|
34993
|
+
max2 = coinQuantityLike[2] ?? void 0;
|
35398
34994
|
} else {
|
35399
34995
|
amount = coinQuantityLike.amount;
|
35400
34996
|
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
35401
|
-
|
34997
|
+
max2 = coinQuantityLike.max ?? void 0;
|
35402
34998
|
}
|
35403
34999
|
const bnAmount = bn(amount);
|
35404
35000
|
return {
|
35405
35001
|
assetId: hexlify(assetId),
|
35406
35002
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
35407
|
-
max:
|
35003
|
+
max: max2 ? bn(max2) : void 0
|
35408
35004
|
};
|
35409
35005
|
};
|
35410
|
-
var
|
35006
|
+
var addAmountToAsset = (params) => {
|
35411
35007
|
const { amount, assetId } = params;
|
35412
35008
|
const coinQuantities = [...params.coinQuantities];
|
35413
35009
|
const assetIdx = coinQuantities.findIndex((coinQuantity) => coinQuantity.assetId === assetId);
|
@@ -35474,6 +35070,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35474
35070
|
var ENCODING_V1 = "1";
|
35475
35071
|
var WORD_SIZE = 8;
|
35476
35072
|
var BYTES_32 = 32;
|
35073
|
+
var UTXO_ID_LEN = BYTES_32 + 1;
|
35477
35074
|
var ASSET_ID_LEN = BYTES_32;
|
35478
35075
|
var ADDRESS_LEN = BYTES_32;
|
35479
35076
|
var NONCE_LEN = BYTES_32;
|
@@ -35481,9 +35078,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35481
35078
|
var TX_POINTER_LEN = WORD_SIZE * 2;
|
35482
35079
|
var MAX_BYTES = 2 ** 32 - 1;
|
35483
35080
|
var calculateVmTxMemory = ({ maxInputs }) => BYTES_32 + // Tx ID
|
35484
|
-
|
35081
|
+
WORD_SIZE + // Tx size
|
35485
35082
|
// Asset ID/Balance coin input pairs
|
35486
|
-
maxInputs * (ASSET_ID_LEN + WORD_SIZE)
|
35083
|
+
maxInputs * (ASSET_ID_LEN + WORD_SIZE);
|
35487
35084
|
var SCRIPT_FIXED_SIZE = WORD_SIZE + // Identifier
|
35488
35085
|
WORD_SIZE + // Gas limit
|
35489
35086
|
WORD_SIZE + // Script size
|
@@ -35501,6 +35098,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35501
35098
|
ASSET_ID_LEN + // Asset id
|
35502
35099
|
TX_POINTER_LEN + // TxPointer
|
35503
35100
|
WORD_SIZE + // Witnesses index
|
35101
|
+
WORD_SIZE + // Maturity
|
35504
35102
|
WORD_SIZE + // Predicate size
|
35505
35103
|
WORD_SIZE + // Predicate data size
|
35506
35104
|
WORD_SIZE;
|
@@ -35822,7 +35420,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35822
35420
|
constructor(name, coders) {
|
35823
35421
|
const caseIndexCoder = new BigNumberCoder("u64");
|
35824
35422
|
const encodedValueSize = Object.values(coders).reduce(
|
35825
|
-
(
|
35423
|
+
(max2, coder) => Math.max(max2, coder.encodedLength),
|
35826
35424
|
0
|
35827
35425
|
);
|
35828
35426
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -36526,7 +36124,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36526
36124
|
constructor(name, coders) {
|
36527
36125
|
const caseIndexCoder = new BigNumberCoder("u64");
|
36528
36126
|
const encodedValueSize = Object.values(coders).reduce(
|
36529
|
-
(
|
36127
|
+
(max2, coder) => Math.max(max2, coder.encodedLength),
|
36530
36128
|
0
|
36531
36129
|
);
|
36532
36130
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -37238,19 +36836,18 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37238
36836
|
encode(value) {
|
37239
36837
|
const parts = [];
|
37240
36838
|
parts.push(new B256Coder().encode(value.txID));
|
37241
|
-
parts.push(new NumberCoder("
|
36839
|
+
parts.push(new NumberCoder("u8").encode(value.outputIndex));
|
37242
36840
|
parts.push(new B256Coder().encode(value.owner));
|
37243
36841
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
37244
36842
|
parts.push(new B256Coder().encode(value.assetId));
|
37245
36843
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
37246
|
-
parts.push(new NumberCoder("
|
36844
|
+
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
36845
|
+
parts.push(new NumberCoder("u32").encode(value.maturity));
|
37247
36846
|
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
|
-
);
|
36847
|
+
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
36848
|
+
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
36849
|
+
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36850
|
+
parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
|
37254
36851
|
return concat(parts);
|
37255
36852
|
}
|
37256
36853
|
decode(data, offset) {
|
@@ -37258,7 +36855,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37258
36855
|
let o = offset;
|
37259
36856
|
[decoded, o] = new B256Coder().decode(data, o);
|
37260
36857
|
const txID = decoded;
|
37261
|
-
[decoded, o] = new NumberCoder("
|
36858
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37262
36859
|
const outputIndex = decoded;
|
37263
36860
|
[decoded, o] = new B256Coder().decode(data, o);
|
37264
36861
|
const owner = decoded;
|
@@ -37268,17 +36865,19 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37268
36865
|
const assetId = decoded;
|
37269
36866
|
[decoded, o] = new TxPointerCoder().decode(data, o);
|
37270
36867
|
const txPointer = decoded;
|
37271
|
-
[decoded, o] = new NumberCoder("
|
36868
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37272
36869
|
const witnessIndex = Number(decoded);
|
36870
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
36871
|
+
const maturity = decoded;
|
37273
36872
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37274
36873
|
const predicateGasUsed = decoded;
|
37275
|
-
[decoded, o] = new
|
36874
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37276
36875
|
const predicateLength = decoded;
|
37277
|
-
[decoded, o] = new
|
36876
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37278
36877
|
const predicateDataLength = decoded;
|
37279
|
-
[decoded, o] = new ByteArrayCoder(predicateLength
|
36878
|
+
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37280
36879
|
const predicate = decoded;
|
37281
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength
|
36880
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37282
36881
|
const predicateData = decoded;
|
37283
36882
|
return [
|
37284
36883
|
{
|
@@ -37290,6 +36889,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37290
36889
|
assetId,
|
37291
36890
|
txPointer,
|
37292
36891
|
witnessIndex,
|
36892
|
+
maturity,
|
37293
36893
|
predicateGasUsed,
|
37294
36894
|
predicateLength,
|
37295
36895
|
predicateDataLength,
|
@@ -37307,7 +36907,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37307
36907
|
encode(value) {
|
37308
36908
|
const parts = [];
|
37309
36909
|
parts.push(new B256Coder().encode(value.txID));
|
37310
|
-
parts.push(new NumberCoder("
|
36910
|
+
parts.push(new NumberCoder("u8").encode(value.outputIndex));
|
37311
36911
|
parts.push(new B256Coder().encode(value.balanceRoot));
|
37312
36912
|
parts.push(new B256Coder().encode(value.stateRoot));
|
37313
36913
|
parts.push(new TxPointerCoder().encode(value.txPointer));
|
@@ -37319,7 +36919,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37319
36919
|
let o = offset;
|
37320
36920
|
[decoded, o] = new B256Coder().decode(data, o);
|
37321
36921
|
const txID = decoded;
|
37322
|
-
[decoded, o] = new NumberCoder("
|
36922
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37323
36923
|
const outputIndex = decoded;
|
37324
36924
|
[decoded, o] = new B256Coder().decode(data, o);
|
37325
36925
|
const balanceRoot = decoded;
|
@@ -37368,16 +36968,14 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37368
36968
|
parts.push(new ByteArrayCoder(32).encode(value.recipient));
|
37369
36969
|
parts.push(new BigNumberCoder("u64").encode(value.amount));
|
37370
36970
|
parts.push(new ByteArrayCoder(32).encode(value.nonce));
|
37371
|
-
parts.push(new NumberCoder("
|
36971
|
+
parts.push(new NumberCoder("u8").encode(value.witnessIndex));
|
37372
36972
|
parts.push(new BigNumberCoder("u64").encode(value.predicateGasUsed));
|
37373
|
-
parts.push(new
|
37374
|
-
parts.push(new
|
37375
|
-
parts.push(new
|
36973
|
+
parts.push(new NumberCoder("u32").encode(data.length));
|
36974
|
+
parts.push(new NumberCoder("u32").encode(value.predicateLength));
|
36975
|
+
parts.push(new NumberCoder("u32").encode(value.predicateDataLength));
|
37376
36976
|
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
|
-
);
|
36977
|
+
parts.push(new ByteArrayCoder(value.predicateLength).encode(value.predicate));
|
36978
|
+
parts.push(new ByteArrayCoder(value.predicateDataLength).encode(value.predicateData));
|
37381
36979
|
return concat(parts);
|
37382
36980
|
}
|
37383
36981
|
static decodeData(messageData) {
|
@@ -37397,21 +36995,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37397
36995
|
const amount = decoded;
|
37398
36996
|
[decoded, o] = new B256Coder().decode(data, o);
|
37399
36997
|
const nonce = decoded;
|
37400
|
-
[decoded, o] = new NumberCoder("
|
36998
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
37401
36999
|
const witnessIndex = Number(decoded);
|
37402
37000
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37403
37001
|
const predicateGasUsed = decoded;
|
37404
37002
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37405
37003
|
const dataLength2 = decoded;
|
37406
|
-
[decoded, o] = new
|
37004
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37407
37005
|
const predicateLength = decoded;
|
37408
|
-
[decoded, o] = new
|
37006
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37409
37007
|
const predicateDataLength = decoded;
|
37410
37008
|
[decoded, o] = new ByteArrayCoder(dataLength2).decode(data, o);
|
37411
37009
|
const messageData = decoded;
|
37412
|
-
[decoded, o] = new ByteArrayCoder(predicateLength
|
37010
|
+
[decoded, o] = new ByteArrayCoder(predicateLength).decode(data, o);
|
37413
37011
|
const predicate = decoded;
|
37414
|
-
[decoded, o] = new ByteArrayCoder(predicateDataLength
|
37012
|
+
[decoded, o] = new ByteArrayCoder(predicateDataLength).decode(data, o);
|
37415
37013
|
const predicateData = decoded;
|
37416
37014
|
return [
|
37417
37015
|
{
|
@@ -37723,7 +37321,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37723
37321
|
}
|
37724
37322
|
};
|
37725
37323
|
var PolicyType = /* @__PURE__ */ ((PolicyType2) => {
|
37726
|
-
PolicyType2[PolicyType2["
|
37324
|
+
PolicyType2[PolicyType2["GasPrice"] = 1] = "GasPrice";
|
37727
37325
|
PolicyType2[PolicyType2["WitnessLimit"] = 2] = "WitnessLimit";
|
37728
37326
|
PolicyType2[PolicyType2["Maturity"] = 4] = "Maturity";
|
37729
37327
|
PolicyType2[PolicyType2["MaxFee"] = 8] = "MaxFee";
|
@@ -37771,9 +37369,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
37771
37369
|
let o = offset;
|
37772
37370
|
const policies = [];
|
37773
37371
|
if (policyTypes & 1) {
|
37774
|
-
const [
|
37372
|
+
const [gasPrice, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
37775
37373
|
o = nextOffset;
|
37776
|
-
policies.push({ type: 1, data:
|
37374
|
+
policies.push({ type: 1, data: gasPrice });
|
37777
37375
|
}
|
37778
37376
|
if (policyTypes & 2) {
|
37779
37377
|
const [witnessLimit, nextOffset] = new BigNumberCoder("u64").decode(data, o);
|
@@ -38005,15 +37603,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38005
37603
|
encode(value) {
|
38006
37604
|
const parts = [];
|
38007
37605
|
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));
|
37606
|
+
parts.push(new NumberCoder("u32").encode(value.scriptLength));
|
37607
|
+
parts.push(new NumberCoder("u32").encode(value.scriptDataLength));
|
38011
37608
|
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.
|
37609
|
+
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37610
|
+
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37611
|
+
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37612
|
+
parts.push(new B256Coder().encode(value.receiptsRoot));
|
37613
|
+
parts.push(new ByteArrayCoder(value.scriptLength).encode(value.script));
|
37614
|
+
parts.push(new ByteArrayCoder(value.scriptDataLength).encode(value.scriptData));
|
38017
37615
|
parts.push(new PoliciesCoder().encode(value.policies));
|
38018
37616
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
38019
37617
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
@@ -38025,23 +37623,23 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38025
37623
|
let o = offset;
|
38026
37624
|
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38027
37625
|
const scriptGasLimit = decoded;
|
38028
|
-
[decoded, o] = new
|
38029
|
-
const receiptsRoot = decoded;
|
38030
|
-
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
37626
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38031
37627
|
const scriptLength = decoded;
|
38032
|
-
[decoded, o] = new
|
37628
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38033
37629
|
const scriptDataLength = decoded;
|
38034
37630
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38035
37631
|
const policyTypes = decoded;
|
38036
|
-
[decoded, o] = new NumberCoder("
|
37632
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38037
37633
|
const inputsCount = decoded;
|
38038
|
-
[decoded, o] = new NumberCoder("
|
37634
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38039
37635
|
const outputsCount = decoded;
|
38040
|
-
[decoded, o] = new NumberCoder("
|
37636
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38041
37637
|
const witnessesCount = decoded;
|
38042
|
-
[decoded, o] = new
|
37638
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
37639
|
+
const receiptsRoot = decoded;
|
37640
|
+
[decoded, o] = new ByteArrayCoder(scriptLength).decode(data, o);
|
38043
37641
|
const script = decoded;
|
38044
|
-
[decoded, o] = new ByteArrayCoder(scriptDataLength
|
37642
|
+
[decoded, o] = new ByteArrayCoder(scriptDataLength).decode(data, o);
|
38045
37643
|
const scriptData = decoded;
|
38046
37644
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
38047
37645
|
const policies = decoded;
|
@@ -38079,19 +37677,18 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38079
37677
|
}
|
38080
37678
|
encode(value) {
|
38081
37679
|
const parts = [];
|
38082
|
-
parts.push(new NumberCoder("
|
38083
|
-
parts.push(new
|
38084
|
-
parts.push(new BigNumberCoder("u64").encode(value.storageSlotsCount));
|
37680
|
+
parts.push(new NumberCoder("u32").encode(value.bytecodeLength));
|
37681
|
+
parts.push(new NumberCoder("u8").encode(value.bytecodeWitnessIndex));
|
38085
37682
|
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("
|
37683
|
+
parts.push(new NumberCoder("u16").encode(value.storageSlotsCount));
|
37684
|
+
parts.push(new NumberCoder("u8").encode(value.inputsCount));
|
37685
|
+
parts.push(new NumberCoder("u8").encode(value.outputsCount));
|
37686
|
+
parts.push(new NumberCoder("u8").encode(value.witnessesCount));
|
37687
|
+
parts.push(new B256Coder().encode(value.salt));
|
37688
|
+
parts.push(new PoliciesCoder().encode(value.policies));
|
38089
37689
|
parts.push(
|
38090
|
-
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount
|
38091
|
-
value.storageSlots
|
38092
|
-
)
|
37690
|
+
new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount).encode(value.storageSlots)
|
38093
37691
|
);
|
38094
|
-
parts.push(new PoliciesCoder().encode(value.policies));
|
38095
37692
|
parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs));
|
38096
37693
|
parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs));
|
38097
37694
|
parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses));
|
@@ -38100,27 +37697,26 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38100
37697
|
decode(data, offset) {
|
38101
37698
|
let decoded;
|
38102
37699
|
let o = offset;
|
38103
|
-
[decoded, o] = new NumberCoder("
|
37700
|
+
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
37701
|
+
const bytecodeLength = decoded;
|
37702
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38104
37703
|
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
37704
|
[decoded, o] = new NumberCoder("u32").decode(data, o);
|
38110
37705
|
const policyTypes = decoded;
|
38111
37706
|
[decoded, o] = new NumberCoder("u16").decode(data, o);
|
37707
|
+
const storageSlotsCount = decoded;
|
37708
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38112
37709
|
const inputsCount = decoded;
|
38113
|
-
[decoded, o] = new NumberCoder("
|
37710
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38114
37711
|
const outputsCount = decoded;
|
38115
|
-
[decoded, o] = new NumberCoder("
|
37712
|
+
[decoded, o] = new NumberCoder("u8").decode(data, o);
|
38116
37713
|
const witnessesCount = decoded;
|
38117
|
-
[decoded, o] = new
|
38118
|
-
|
38119
|
-
o
|
38120
|
-
);
|
38121
|
-
const storageSlots = decoded;
|
37714
|
+
[decoded, o] = new B256Coder().decode(data, o);
|
37715
|
+
const salt = decoded;
|
38122
37716
|
[decoded, o] = new PoliciesCoder().decode(data, o, policyTypes);
|
38123
37717
|
const policies = decoded;
|
37718
|
+
[decoded, o] = new ArrayCoder(new StorageSlotCoder(), storageSlotsCount).decode(data, o);
|
37719
|
+
const storageSlots = decoded;
|
38124
37720
|
[decoded, o] = new ArrayCoder(new InputCoder(), inputsCount).decode(data, o);
|
38125
37721
|
const inputs = decoded;
|
38126
37722
|
[decoded, o] = new ArrayCoder(new OutputCoder(), outputsCount).decode(data, o);
|
@@ -38130,6 +37726,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38130
37726
|
return [
|
38131
37727
|
{
|
38132
37728
|
type: 1,
|
37729
|
+
bytecodeLength,
|
38133
37730
|
bytecodeWitnessIndex,
|
38134
37731
|
policyTypes,
|
38135
37732
|
storageSlotsCount,
|
@@ -38158,7 +37755,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38158
37755
|
parts.push(new OutputContractCoder().encode(value.outputContract));
|
38159
37756
|
parts.push(new BigNumberCoder("u64").encode(value.mintAmount));
|
38160
37757
|
parts.push(new B256Coder().encode(value.mintAssetId));
|
38161
|
-
parts.push(new BigNumberCoder("u64").encode(value.gasPrice));
|
38162
37758
|
return concat(parts);
|
38163
37759
|
}
|
38164
37760
|
decode(data, offset) {
|
@@ -38174,8 +37770,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38174
37770
|
const mintAmount = decoded;
|
38175
37771
|
[decoded, o] = new B256Coder().decode(data, o);
|
38176
37772
|
const mintAssetId = decoded;
|
38177
|
-
[decoded, o] = new BigNumberCoder("u64").decode(data, o);
|
38178
|
-
const gasPrice = decoded;
|
38179
37773
|
return [
|
38180
37774
|
{
|
38181
37775
|
type: 2,
|
@@ -38183,8 +37777,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38183
37777
|
inputContract,
|
38184
37778
|
outputContract,
|
38185
37779
|
mintAmount,
|
38186
|
-
mintAssetId
|
38187
|
-
gasPrice
|
37780
|
+
mintAssetId
|
38188
37781
|
},
|
38189
37782
|
o
|
38190
37783
|
];
|
@@ -38491,6 +38084,159 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
38491
38084
|
// src/providers/provider.ts
|
38492
38085
|
var import_graphql_request = __toESM(require_dist2());
|
38493
38086
|
|
38087
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isPlaceholder.js
|
38088
|
+
function _isPlaceholder(a) {
|
38089
|
+
return a != null && typeof a === "object" && a["@@functional/placeholder"] === true;
|
38090
|
+
}
|
38091
|
+
|
38092
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_curry1.js
|
38093
|
+
function _curry1(fn) {
|
38094
|
+
return function f1(a) {
|
38095
|
+
if (arguments.length === 0 || _isPlaceholder(a)) {
|
38096
|
+
return f1;
|
38097
|
+
} else {
|
38098
|
+
return fn.apply(this, arguments);
|
38099
|
+
}
|
38100
|
+
};
|
38101
|
+
}
|
38102
|
+
|
38103
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isArray.js
|
38104
|
+
var isArray_default = Array.isArray || function _isArray(val) {
|
38105
|
+
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]";
|
38106
|
+
};
|
38107
|
+
|
38108
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/type.js
|
38109
|
+
var type = /* @__PURE__ */ _curry1(function type2(val) {
|
38110
|
+
return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1);
|
38111
|
+
});
|
38112
|
+
var type_default = type;
|
38113
|
+
|
38114
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_toISOString.js
|
38115
|
+
var pad = function pad2(n) {
|
38116
|
+
return (n < 10 ? "0" : "") + n;
|
38117
|
+
};
|
38118
|
+
var _toISOString = typeof Date.prototype.toISOString === "function" ? function _toISOString2(d) {
|
38119
|
+
return d.toISOString();
|
38120
|
+
} : function _toISOString3(d) {
|
38121
|
+
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";
|
38122
|
+
};
|
38123
|
+
|
38124
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_isInteger.js
|
38125
|
+
var isInteger_default = Number.isInteger || function _isInteger(n) {
|
38126
|
+
return n << 0 === n;
|
38127
|
+
};
|
38128
|
+
|
38129
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_cloneRegExp.js
|
38130
|
+
function _cloneRegExp(pattern) {
|
38131
|
+
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" : ""));
|
38132
|
+
}
|
38133
|
+
|
38134
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/internal/_clone.js
|
38135
|
+
function _clone(value, deep, map) {
|
38136
|
+
map || (map = new _ObjectMap());
|
38137
|
+
if (_isPrimitive(value)) {
|
38138
|
+
return value;
|
38139
|
+
}
|
38140
|
+
var copy = function copy2(copiedValue) {
|
38141
|
+
var cachedCopy = map.get(value);
|
38142
|
+
if (cachedCopy) {
|
38143
|
+
return cachedCopy;
|
38144
|
+
}
|
38145
|
+
map.set(value, copiedValue);
|
38146
|
+
for (var key in value) {
|
38147
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
38148
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
38149
|
+
}
|
38150
|
+
}
|
38151
|
+
return copiedValue;
|
38152
|
+
};
|
38153
|
+
switch (type_default(value)) {
|
38154
|
+
case "Object":
|
38155
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
38156
|
+
case "Array":
|
38157
|
+
return copy([]);
|
38158
|
+
case "Date":
|
38159
|
+
return new Date(value.valueOf());
|
38160
|
+
case "RegExp":
|
38161
|
+
return _cloneRegExp(value);
|
38162
|
+
case "Int8Array":
|
38163
|
+
case "Uint8Array":
|
38164
|
+
case "Uint8ClampedArray":
|
38165
|
+
case "Int16Array":
|
38166
|
+
case "Uint16Array":
|
38167
|
+
case "Int32Array":
|
38168
|
+
case "Uint32Array":
|
38169
|
+
case "Float32Array":
|
38170
|
+
case "Float64Array":
|
38171
|
+
case "BigInt64Array":
|
38172
|
+
case "BigUint64Array":
|
38173
|
+
return value.slice();
|
38174
|
+
default:
|
38175
|
+
return value;
|
38176
|
+
}
|
38177
|
+
}
|
38178
|
+
function _isPrimitive(param) {
|
38179
|
+
var type3 = typeof param;
|
38180
|
+
return param == null || type3 != "object" && type3 != "function";
|
38181
|
+
}
|
38182
|
+
var _ObjectMap = /* @__PURE__ */ function() {
|
38183
|
+
function _ObjectMap2() {
|
38184
|
+
this.map = {};
|
38185
|
+
this.length = 0;
|
38186
|
+
}
|
38187
|
+
_ObjectMap2.prototype.set = function(key, value) {
|
38188
|
+
const hashedKey = this.hash(key);
|
38189
|
+
let bucket = this.map[hashedKey];
|
38190
|
+
if (!bucket) {
|
38191
|
+
this.map[hashedKey] = bucket = [];
|
38192
|
+
}
|
38193
|
+
bucket.push([key, value]);
|
38194
|
+
this.length += 1;
|
38195
|
+
};
|
38196
|
+
_ObjectMap2.prototype.hash = function(key) {
|
38197
|
+
let hashedKey = [];
|
38198
|
+
for (var value in key) {
|
38199
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
38200
|
+
}
|
38201
|
+
return hashedKey.join();
|
38202
|
+
};
|
38203
|
+
_ObjectMap2.prototype.get = function(key) {
|
38204
|
+
if (this.length <= 180) {
|
38205
|
+
for (const p in this.map) {
|
38206
|
+
const bucket2 = this.map[p];
|
38207
|
+
for (let i = 0; i < bucket2.length; i += 1) {
|
38208
|
+
const element = bucket2[i];
|
38209
|
+
if (element[0] === key) {
|
38210
|
+
return element[1];
|
38211
|
+
}
|
38212
|
+
}
|
38213
|
+
}
|
38214
|
+
return;
|
38215
|
+
}
|
38216
|
+
const hashedKey = this.hash(key);
|
38217
|
+
const bucket = this.map[hashedKey];
|
38218
|
+
if (!bucket) {
|
38219
|
+
return;
|
38220
|
+
}
|
38221
|
+
for (let i = 0; i < bucket.length; i += 1) {
|
38222
|
+
const element = bucket[i];
|
38223
|
+
if (element[0] === key) {
|
38224
|
+
return element[1];
|
38225
|
+
}
|
38226
|
+
}
|
38227
|
+
};
|
38228
|
+
return _ObjectMap2;
|
38229
|
+
}();
|
38230
|
+
|
38231
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/clone.js
|
38232
|
+
var clone2 = /* @__PURE__ */ _curry1(function clone3(value) {
|
38233
|
+
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, true);
|
38234
|
+
});
|
38235
|
+
var clone_default = clone2;
|
38236
|
+
|
38237
|
+
// ../../node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/trim.js
|
38238
|
+
var hasProtoTrim = typeof String.prototype.trim === "function";
|
38239
|
+
|
38494
38240
|
// ../../node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs
|
38495
38241
|
var __assign = function() {
|
38496
38242
|
__assign = Object.assign || function __assign2(t) {
|
@@ -41658,10 +41404,14 @@ spurious results.`);
|
|
41658
41404
|
// src/providers/__generated__/operations.ts
|
41659
41405
|
var ReceiptFragmentFragmentDoc = lib_default2`
|
41660
41406
|
fragment receiptFragment on Receipt {
|
41661
|
-
|
41407
|
+
contract {
|
41408
|
+
id
|
41409
|
+
}
|
41662
41410
|
pc
|
41663
41411
|
is
|
41664
|
-
to
|
41412
|
+
to {
|
41413
|
+
id
|
41414
|
+
}
|
41665
41415
|
toAddress
|
41666
41416
|
amount
|
41667
41417
|
assetId
|
@@ -41699,16 +41449,10 @@ spurious results.`);
|
|
41699
41449
|
id
|
41700
41450
|
}
|
41701
41451
|
time
|
41702
|
-
receipts {
|
41703
|
-
...receiptFragment
|
41704
|
-
}
|
41705
41452
|
programState {
|
41706
41453
|
returnType
|
41707
41454
|
data
|
41708
41455
|
}
|
41709
|
-
receipts {
|
41710
|
-
...receiptFragment
|
41711
|
-
}
|
41712
41456
|
}
|
41713
41457
|
... on FailureStatus {
|
41714
41458
|
block {
|
@@ -41716,24 +41460,26 @@ spurious results.`);
|
|
41716
41460
|
}
|
41717
41461
|
time
|
41718
41462
|
reason
|
41719
|
-
receipts {
|
41720
|
-
...receiptFragment
|
41721
|
-
}
|
41722
41463
|
}
|
41723
41464
|
... on SqueezedOutStatus {
|
41724
41465
|
reason
|
41725
41466
|
}
|
41726
41467
|
}
|
41727
|
-
|
41468
|
+
`;
|
41728
41469
|
var TransactionFragmentFragmentDoc = lib_default2`
|
41729
41470
|
fragment transactionFragment on Transaction {
|
41730
41471
|
id
|
41731
41472
|
rawPayload
|
41473
|
+
gasPrice
|
41474
|
+
receipts {
|
41475
|
+
...receiptFragment
|
41476
|
+
}
|
41732
41477
|
status {
|
41733
41478
|
...transactionStatusFragment
|
41734
41479
|
}
|
41735
41480
|
}
|
41736
|
-
${
|
41481
|
+
${ReceiptFragmentFragmentDoc}
|
41482
|
+
${TransactionStatusFragmentFragmentDoc}`;
|
41737
41483
|
var InputEstimatePredicatesFragmentFragmentDoc = lib_default2`
|
41738
41484
|
fragment inputEstimatePredicatesFragment on Input {
|
41739
41485
|
... on InputCoin {
|
@@ -41751,46 +41497,6 @@ spurious results.`);
|
|
41751
41497
|
}
|
41752
41498
|
}
|
41753
41499
|
${InputEstimatePredicatesFragmentFragmentDoc}`;
|
41754
|
-
var DryRunFailureStatusFragmentFragmentDoc = lib_default2`
|
41755
|
-
fragment dryRunFailureStatusFragment on DryRunFailureStatus {
|
41756
|
-
reason
|
41757
|
-
programState {
|
41758
|
-
returnType
|
41759
|
-
data
|
41760
|
-
}
|
41761
|
-
}
|
41762
|
-
`;
|
41763
|
-
var DryRunSuccessStatusFragmentFragmentDoc = lib_default2`
|
41764
|
-
fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
|
41765
|
-
programState {
|
41766
|
-
returnType
|
41767
|
-
data
|
41768
|
-
}
|
41769
|
-
}
|
41770
|
-
`;
|
41771
|
-
var DryRunTransactionStatusFragmentFragmentDoc = lib_default2`
|
41772
|
-
fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
|
41773
|
-
... on DryRunFailureStatus {
|
41774
|
-
...dryRunFailureStatusFragment
|
41775
|
-
}
|
41776
|
-
... on DryRunSuccessStatus {
|
41777
|
-
...dryRunSuccessStatusFragment
|
41778
|
-
}
|
41779
|
-
}
|
41780
|
-
${DryRunFailureStatusFragmentFragmentDoc}
|
41781
|
-
${DryRunSuccessStatusFragmentFragmentDoc}`;
|
41782
|
-
var DryRunTransactionExecutionStatusFragmentFragmentDoc = lib_default2`
|
41783
|
-
fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
|
41784
|
-
id
|
41785
|
-
status {
|
41786
|
-
...dryRunTransactionStatusFragment
|
41787
|
-
}
|
41788
|
-
receipts {
|
41789
|
-
...receiptFragment
|
41790
|
-
}
|
41791
|
-
}
|
41792
|
-
${DryRunTransactionStatusFragmentFragmentDoc}
|
41793
|
-
${ReceiptFragmentFragmentDoc}`;
|
41794
41500
|
var CoinFragmentFragmentDoc = lib_default2`
|
41795
41501
|
fragment coinFragment on Coin {
|
41796
41502
|
__typename
|
@@ -41798,6 +41504,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41798
41504
|
owner
|
41799
41505
|
amount
|
41800
41506
|
assetId
|
41507
|
+
maturity
|
41801
41508
|
blockCreated
|
41802
41509
|
txCreatedIdx
|
41803
41510
|
}
|
@@ -41836,32 +41543,26 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41836
41543
|
messageBlockHeader {
|
41837
41544
|
id
|
41838
41545
|
daHeight
|
41839
|
-
consensusParametersVersion
|
41840
|
-
stateTransitionBytecodeVersion
|
41841
41546
|
transactionsCount
|
41842
|
-
messageReceiptCount
|
41843
41547
|
transactionsRoot
|
41844
|
-
messageOutboxRoot
|
41845
|
-
eventInboxRoot
|
41846
41548
|
height
|
41847
41549
|
prevRoot
|
41848
41550
|
time
|
41849
41551
|
applicationHash
|
41552
|
+
messageReceiptRoot
|
41553
|
+
messageReceiptCount
|
41850
41554
|
}
|
41851
41555
|
commitBlockHeader {
|
41852
41556
|
id
|
41853
41557
|
daHeight
|
41854
|
-
consensusParametersVersion
|
41855
|
-
stateTransitionBytecodeVersion
|
41856
41558
|
transactionsCount
|
41857
|
-
messageReceiptCount
|
41858
41559
|
transactionsRoot
|
41859
|
-
messageOutboxRoot
|
41860
|
-
eventInboxRoot
|
41861
41560
|
height
|
41862
41561
|
prevRoot
|
41863
41562
|
time
|
41864
41563
|
applicationHash
|
41564
|
+
messageReceiptRoot
|
41565
|
+
messageReceiptCount
|
41865
41566
|
}
|
41866
41567
|
sender
|
41867
41568
|
recipient
|
@@ -41880,8 +41581,8 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41880
41581
|
var BlockFragmentFragmentDoc = lib_default2`
|
41881
41582
|
fragment blockFragment on Block {
|
41882
41583
|
id
|
41883
|
-
height
|
41884
41584
|
header {
|
41585
|
+
height
|
41885
41586
|
time
|
41886
41587
|
}
|
41887
41588
|
transactions {
|
@@ -41939,11 +41640,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41939
41640
|
`;
|
41940
41641
|
var GasCostsFragmentFragmentDoc = lib_default2`
|
41941
41642
|
fragment GasCostsFragment on GasCosts {
|
41942
|
-
version {
|
41943
|
-
... on Version {
|
41944
|
-
value
|
41945
|
-
}
|
41946
|
-
}
|
41947
41643
|
add
|
41948
41644
|
addi
|
41949
41645
|
aloc
|
@@ -41956,6 +41652,7 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
41956
41652
|
cb
|
41957
41653
|
cfei
|
41958
41654
|
cfsi
|
41655
|
+
croo
|
41959
41656
|
div
|
41960
41657
|
divi
|
41961
41658
|
ecr1
|
@@ -42038,9 +41735,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
42038
41735
|
ccp {
|
42039
41736
|
...DependentCostFragment
|
42040
41737
|
}
|
42041
|
-
croo {
|
42042
|
-
...DependentCostFragment
|
42043
|
-
}
|
42044
41738
|
csiz {
|
42045
41739
|
...DependentCostFragment
|
42046
41740
|
}
|
@@ -42100,11 +41794,6 @@ ${ReceiptFragmentFragmentDoc}`;
|
|
42100
41794
|
${DependentCostFragmentFragmentDoc}`;
|
42101
41795
|
var ConsensusParametersFragmentFragmentDoc = lib_default2`
|
42102
41796
|
fragment consensusParametersFragment on ConsensusParameters {
|
42103
|
-
version {
|
42104
|
-
... on Version {
|
42105
|
-
value
|
42106
|
-
}
|
42107
|
-
}
|
42108
41797
|
txParams {
|
42109
41798
|
...TxParametersFragment
|
42110
41799
|
}
|
@@ -42164,9 +41853,18 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
42164
41853
|
fragment nodeInfoFragment on NodeInfo {
|
42165
41854
|
utxoValidation
|
42166
41855
|
vmBacktrace
|
41856
|
+
minGasPrice
|
42167
41857
|
maxTx
|
42168
41858
|
maxDepth
|
42169
41859
|
nodeVersion
|
41860
|
+
peers {
|
41861
|
+
id
|
41862
|
+
addresses
|
41863
|
+
clientVersion
|
41864
|
+
blockHeight
|
41865
|
+
lastHeartbeatMs
|
41866
|
+
appScore
|
41867
|
+
}
|
42170
41868
|
}
|
42171
41869
|
`;
|
42172
41870
|
var GetVersionDocument = lib_default2`
|
@@ -42201,9 +41899,13 @@ ${ConsensusParametersFragmentFragmentDoc}`;
|
|
42201
41899
|
query getTransactionWithReceipts($transactionId: TransactionId!) {
|
42202
41900
|
transaction(id: $transactionId) {
|
42203
41901
|
...transactionFragment
|
41902
|
+
receipts {
|
41903
|
+
...receiptFragment
|
41904
|
+
}
|
42204
41905
|
}
|
42205
41906
|
}
|
42206
|
-
${TransactionFragmentFragmentDoc}
|
41907
|
+
${TransactionFragmentFragmentDoc}
|
41908
|
+
${ReceiptFragmentFragmentDoc}`;
|
42207
41909
|
var GetTransactionsDocument = lib_default2`
|
42208
41910
|
query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
|
42209
41911
|
transactions(after: $after, before: $before, first: $first, last: $last) {
|
@@ -42331,20 +42033,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42331
42033
|
}
|
42332
42034
|
}
|
42333
42035
|
${BalanceFragmentFragmentDoc}`;
|
42334
|
-
var GetLatestGasPriceDocument = lib_default2`
|
42335
|
-
query getLatestGasPrice {
|
42336
|
-
latestGasPrice {
|
42337
|
-
gasPrice
|
42338
|
-
}
|
42339
|
-
}
|
42340
|
-
`;
|
42341
|
-
var EstimateGasPriceDocument = lib_default2`
|
42342
|
-
query estimateGasPrice($blockHorizon: U32!) {
|
42343
|
-
estimateGasPrice(blockHorizon: $blockHorizon) {
|
42344
|
-
gasPrice
|
42345
|
-
}
|
42346
|
-
}
|
42347
|
-
`;
|
42348
42036
|
var GetBalancesDocument = lib_default2`
|
42349
42037
|
query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
|
42350
42038
|
balances(
|
@@ -42399,12 +42087,12 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42399
42087
|
}
|
42400
42088
|
`;
|
42401
42089
|
var DryRunDocument = lib_default2`
|
42402
|
-
mutation dryRun($
|
42403
|
-
dryRun(
|
42404
|
-
...
|
42090
|
+
mutation dryRun($encodedTransaction: HexString!, $utxoValidation: Boolean) {
|
42091
|
+
dryRun(tx: $encodedTransaction, utxoValidation: $utxoValidation) {
|
42092
|
+
...receiptFragment
|
42405
42093
|
}
|
42406
42094
|
}
|
42407
|
-
${
|
42095
|
+
${ReceiptFragmentFragmentDoc}`;
|
42408
42096
|
var SubmitDocument = lib_default2`
|
42409
42097
|
mutation submit($encodedTransaction: HexString!) {
|
42410
42098
|
submit(tx: $encodedTransaction) {
|
@@ -42487,12 +42175,6 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42487
42175
|
getBalance(variables, options) {
|
42488
42176
|
return requester(GetBalanceDocument, variables, options);
|
42489
42177
|
},
|
42490
|
-
getLatestGasPrice(variables, options) {
|
42491
|
-
return requester(GetLatestGasPriceDocument, variables, options);
|
42492
|
-
},
|
42493
|
-
estimateGasPrice(variables, options) {
|
42494
|
-
return requester(EstimateGasPriceDocument, variables, options);
|
42495
|
-
},
|
42496
42178
|
getBalances(variables, options) {
|
42497
42179
|
return requester(GetBalancesDocument, variables, options);
|
42498
42180
|
},
|
@@ -42560,14 +42242,11 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
42560
42242
|
let data;
|
42561
42243
|
let errors;
|
42562
42244
|
try {
|
42563
|
-
|
42564
|
-
({ data, errors } = JSON.parse(sanitizedText.replace(/^data:/, "")));
|
42245
|
+
({ data, errors } = JSON.parse(text.replace(/^data:/, "")));
|
42565
42246
|
} catch (e) {
|
42566
42247
|
throw new FuelError(
|
42567
42248
|
ErrorCode.STREAM_PARSING_ERROR,
|
42568
|
-
`Error while parsing stream data response: ${text}
|
42569
|
-
|
42570
|
-
Thrown error: ${e}`
|
42249
|
+
`Error while parsing stream data response: ${text}`
|
42571
42250
|
);
|
42572
42251
|
}
|
42573
42252
|
if (Array.isArray(errors)) {
|
@@ -42660,8 +42339,8 @@ Thrown error: ${e}`
|
|
42660
42339
|
const predicateData = arrayify(value.predicateData ?? "0x");
|
42661
42340
|
return {
|
42662
42341
|
type: InputType.Coin,
|
42663
|
-
txID: hexlify(arrayify(value.id).slice(0,
|
42664
|
-
outputIndex: toNumber2(arrayify(value.id).slice(
|
42342
|
+
txID: hexlify(arrayify(value.id).slice(0, BYTES_32)),
|
42343
|
+
outputIndex: toNumber2(arrayify(value.id).slice(BYTES_32, UTXO_ID_LEN)),
|
42665
42344
|
owner: hexlify(value.owner),
|
42666
42345
|
amount: bn(value.amount),
|
42667
42346
|
assetId: hexlify(value.assetId),
|
@@ -42670,9 +42349,10 @@ Thrown error: ${e}`
|
|
42670
42349
|
txIndex: toNumber2(arrayify(value.txPointer).slice(8, 16))
|
42671
42350
|
},
|
42672
42351
|
witnessIndex: value.witnessIndex,
|
42352
|
+
maturity: value.maturity ?? 0,
|
42673
42353
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42674
|
-
predicateLength:
|
42675
|
-
predicateDataLength:
|
42354
|
+
predicateLength: predicate.length,
|
42355
|
+
predicateDataLength: predicateData.length,
|
42676
42356
|
predicate: hexlify(predicate),
|
42677
42357
|
predicateData: hexlify(predicateData)
|
42678
42358
|
};
|
@@ -42703,8 +42383,8 @@ Thrown error: ${e}`
|
|
42703
42383
|
nonce: hexlify(value.nonce),
|
42704
42384
|
witnessIndex: value.witnessIndex,
|
42705
42385
|
predicateGasUsed: bn(value.predicateGasUsed),
|
42706
|
-
predicateLength:
|
42707
|
-
predicateDataLength:
|
42386
|
+
predicateLength: predicate.length,
|
42387
|
+
predicateDataLength: predicateData.length,
|
42708
42388
|
predicate: hexlify(predicate),
|
42709
42389
|
predicateData: hexlify(predicateData),
|
42710
42390
|
data: hexlify(data),
|
@@ -42861,8 +42541,8 @@ Thrown error: ${e}`
|
|
42861
42541
|
case "CALL" /* Call */: {
|
42862
42542
|
const callReceipt = {
|
42863
42543
|
type: ReceiptType.Call,
|
42864
|
-
from: hexOrZero(receipt.id
|
42865
|
-
to: hexOrZero(receipt?.to),
|
42544
|
+
from: hexOrZero(receipt.contract?.id),
|
42545
|
+
to: hexOrZero(receipt?.to?.id),
|
42866
42546
|
amount: bn(receipt.amount),
|
42867
42547
|
assetId: hexOrZero(receipt.assetId),
|
42868
42548
|
gas: bn(receipt.gas),
|
@@ -42876,7 +42556,7 @@ Thrown error: ${e}`
|
|
42876
42556
|
case "RETURN" /* Return */: {
|
42877
42557
|
const returnReceipt = {
|
42878
42558
|
type: ReceiptType.Return,
|
42879
|
-
id: hexOrZero(receipt.id
|
42559
|
+
id: hexOrZero(receipt.contract?.id),
|
42880
42560
|
val: bn(receipt.val),
|
42881
42561
|
pc: bn(receipt.pc),
|
42882
42562
|
is: bn(receipt.is)
|
@@ -42886,7 +42566,7 @@ Thrown error: ${e}`
|
|
42886
42566
|
case "RETURN_DATA" /* ReturnData */: {
|
42887
42567
|
const returnDataReceipt = {
|
42888
42568
|
type: ReceiptType.ReturnData,
|
42889
|
-
id: hexOrZero(receipt.id
|
42569
|
+
id: hexOrZero(receipt.contract?.id),
|
42890
42570
|
ptr: bn(receipt.ptr),
|
42891
42571
|
len: bn(receipt.len),
|
42892
42572
|
digest: hexOrZero(receipt.digest),
|
@@ -42898,7 +42578,7 @@ Thrown error: ${e}`
|
|
42898
42578
|
case "PANIC" /* Panic */: {
|
42899
42579
|
const panicReceipt = {
|
42900
42580
|
type: ReceiptType.Panic,
|
42901
|
-
id: hexOrZero(receipt.id),
|
42581
|
+
id: hexOrZero(receipt.contract?.id),
|
42902
42582
|
reason: bn(receipt.reason),
|
42903
42583
|
pc: bn(receipt.pc),
|
42904
42584
|
is: bn(receipt.is),
|
@@ -42909,7 +42589,7 @@ Thrown error: ${e}`
|
|
42909
42589
|
case "REVERT" /* Revert */: {
|
42910
42590
|
const revertReceipt = {
|
42911
42591
|
type: ReceiptType.Revert,
|
42912
|
-
id: hexOrZero(receipt.id
|
42592
|
+
id: hexOrZero(receipt.contract?.id),
|
42913
42593
|
val: bn(receipt.ra),
|
42914
42594
|
pc: bn(receipt.pc),
|
42915
42595
|
is: bn(receipt.is)
|
@@ -42919,7 +42599,7 @@ Thrown error: ${e}`
|
|
42919
42599
|
case "LOG" /* Log */: {
|
42920
42600
|
const logReceipt = {
|
42921
42601
|
type: ReceiptType.Log,
|
42922
|
-
id: hexOrZero(receipt.id
|
42602
|
+
id: hexOrZero(receipt.contract?.id),
|
42923
42603
|
val0: bn(receipt.ra),
|
42924
42604
|
val1: bn(receipt.rb),
|
42925
42605
|
val2: bn(receipt.rc),
|
@@ -42932,7 +42612,7 @@ Thrown error: ${e}`
|
|
42932
42612
|
case "LOG_DATA" /* LogData */: {
|
42933
42613
|
const logDataReceipt = {
|
42934
42614
|
type: ReceiptType.LogData,
|
42935
|
-
id: hexOrZero(receipt.id
|
42615
|
+
id: hexOrZero(receipt.contract?.id),
|
42936
42616
|
val0: bn(receipt.ra),
|
42937
42617
|
val1: bn(receipt.rb),
|
42938
42618
|
ptr: bn(receipt.ptr),
|
@@ -42946,8 +42626,8 @@ Thrown error: ${e}`
|
|
42946
42626
|
case "TRANSFER" /* Transfer */: {
|
42947
42627
|
const transferReceipt = {
|
42948
42628
|
type: ReceiptType.Transfer,
|
42949
|
-
from: hexOrZero(receipt.id
|
42950
|
-
to: hexOrZero(receipt.toAddress || receipt?.to),
|
42629
|
+
from: hexOrZero(receipt.contract?.id),
|
42630
|
+
to: hexOrZero(receipt.toAddress || receipt?.to?.id),
|
42951
42631
|
amount: bn(receipt.amount),
|
42952
42632
|
assetId: hexOrZero(receipt.assetId),
|
42953
42633
|
pc: bn(receipt.pc),
|
@@ -42958,8 +42638,8 @@ Thrown error: ${e}`
|
|
42958
42638
|
case "TRANSFER_OUT" /* TransferOut */: {
|
42959
42639
|
const transferOutReceipt = {
|
42960
42640
|
type: ReceiptType.TransferOut,
|
42961
|
-
from: hexOrZero(receipt.id
|
42962
|
-
to: hexOrZero(receipt.toAddress || receipt.to),
|
42641
|
+
from: hexOrZero(receipt.contract?.id),
|
42642
|
+
to: hexOrZero(receipt.toAddress || receipt.to?.id),
|
42963
42643
|
amount: bn(receipt.amount),
|
42964
42644
|
assetId: hexOrZero(receipt.assetId),
|
42965
42645
|
pc: bn(receipt.pc),
|
@@ -43002,7 +42682,7 @@ Thrown error: ${e}`
|
|
43002
42682
|
return receiptMessageOut;
|
43003
42683
|
}
|
43004
42684
|
case "MINT" /* Mint */: {
|
43005
|
-
const contractId = hexOrZero(receipt.id
|
42685
|
+
const contractId = hexOrZero(receipt.contract?.id);
|
43006
42686
|
const subId = hexOrZero(receipt.subId);
|
43007
42687
|
const assetId = ReceiptMintCoder.getAssetId(contractId, subId);
|
43008
42688
|
const mintReceipt = {
|
@@ -43017,7 +42697,7 @@ Thrown error: ${e}`
|
|
43017
42697
|
return mintReceipt;
|
43018
42698
|
}
|
43019
42699
|
case "BURN" /* Burn */: {
|
43020
|
-
const contractId = hexOrZero(receipt.id
|
42700
|
+
const contractId = hexOrZero(receipt.contract?.id);
|
43021
42701
|
const subId = hexOrZero(receipt.subId);
|
43022
42702
|
const assetId = ReceiptBurnCoder.getAssetId(contractId, subId);
|
43023
42703
|
const burnReceipt = {
|
@@ -43037,6 +42717,7 @@ Thrown error: ${e}`
|
|
43037
42717
|
}
|
43038
42718
|
|
43039
42719
|
// src/providers/utils/gas.ts
|
42720
|
+
var calculatePriceWithFactor = (gas, gasPrice, priceFactor) => bn(Math.ceil(gas.mul(gasPrice).toNumber() / priceFactor.toNumber()));
|
43040
42721
|
var getGasUsedFromReceipts = (receipts) => {
|
43041
42722
|
const scriptResult = receipts.filter(
|
43042
42723
|
(receipt) => receipt.type === ReceiptType.ScriptResult
|
@@ -43057,28 +42738,18 @@ Thrown error: ${e}`
|
|
43057
42738
|
}
|
43058
42739
|
function gasUsedByInputs(inputs, txBytesSize, gasCosts) {
|
43059
42740
|
const witnessCache = [];
|
43060
|
-
const
|
43061
|
-
const isCoinOrMessage = "owner" in input || "sender" in input;
|
43062
|
-
if (isCoinOrMessage) {
|
43063
|
-
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43064
|
-
return true;
|
43065
|
-
}
|
43066
|
-
if (!witnessCache.includes(input.witnessIndex)) {
|
43067
|
-
witnessCache.push(input.witnessIndex);
|
43068
|
-
return true;
|
43069
|
-
}
|
43070
|
-
}
|
43071
|
-
return false;
|
43072
|
-
});
|
43073
|
-
const vmInitializationCost = resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization);
|
43074
|
-
const totalGas = chargeableInputs.reduce((total, input) => {
|
42741
|
+
const totalGas = inputs.reduce((total, input) => {
|
43075
42742
|
if ("predicate" in input && input.predicate && input.predicate !== "0x") {
|
43076
42743
|
return total.add(
|
43077
|
-
|
42744
|
+
resolveGasDependentCosts(txBytesSize, gasCosts.vmInitialization).add(resolveGasDependentCosts(arrayify(input.predicate).length, gasCosts.contractRoot)).add(bn(input.predicateGasUsed))
|
43078
42745
|
);
|
43079
42746
|
}
|
43080
|
-
|
43081
|
-
|
42747
|
+
if ("witnessIndex" in input && !witnessCache.includes(input.witnessIndex)) {
|
42748
|
+
witnessCache.push(input.witnessIndex);
|
42749
|
+
return total.add(gasCosts.ecr1);
|
42750
|
+
}
|
42751
|
+
return total;
|
42752
|
+
}, bn());
|
43082
42753
|
return totalGas;
|
43083
42754
|
}
|
43084
42755
|
function getMinGas(params) {
|
@@ -43090,20 +42761,12 @@ Thrown error: ${e}`
|
|
43090
42761
|
return minGas;
|
43091
42762
|
}
|
43092
42763
|
function getMaxGas(params) {
|
43093
|
-
const {
|
43094
|
-
gasPerByte,
|
43095
|
-
witnessesLength,
|
43096
|
-
witnessLimit,
|
43097
|
-
minGas,
|
43098
|
-
gasLimit = bn(0),
|
43099
|
-
maxGasPerTx
|
43100
|
-
} = params;
|
42764
|
+
const { gasPerByte, witnessesLength, witnessLimit, minGas, gasLimit = bn(0) } = params;
|
43101
42765
|
let remainingAllowedWitnessGas = bn(0);
|
43102
42766
|
if (witnessLimit?.gt(0) && witnessLimit.gte(witnessesLength)) {
|
43103
42767
|
remainingAllowedWitnessGas = bn(witnessLimit).sub(witnessesLength).mul(gasPerByte);
|
43104
42768
|
}
|
43105
|
-
|
43106
|
-
return maxGas.gte(maxGasPerTx) ? maxGasPerTx : maxGas;
|
42769
|
+
return remainingAllowedWitnessGas.add(minGas).add(gasLimit);
|
43107
42770
|
}
|
43108
42771
|
function calculateMetadataGasForTxCreate({
|
43109
42772
|
gasCosts,
|
@@ -43125,10 +42788,6 @@ Thrown error: ${e}`
|
|
43125
42788
|
}) {
|
43126
42789
|
return resolveGasDependentCosts(txBytesSize, gasCosts.s256);
|
43127
42790
|
}
|
43128
|
-
var calculateGasFee = (params) => {
|
43129
|
-
const { gas, gasPrice, priceFactor, tip } = params;
|
43130
|
-
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
43131
|
-
};
|
43132
42791
|
|
43133
42792
|
// src/providers/utils/json.ts
|
43134
42793
|
function normalize2(object) {
|
@@ -43258,7 +42917,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43258
42917
|
// src/providers/transaction-request/transaction-request.ts
|
43259
42918
|
var BaseTransactionRequest = class {
|
43260
42919
|
/** Gas price for transaction */
|
43261
|
-
|
42920
|
+
gasPrice;
|
43262
42921
|
/** Block until which tx cannot be included */
|
43263
42922
|
maturity;
|
43264
42923
|
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
@@ -43277,7 +42936,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43277
42936
|
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
43278
42937
|
*/
|
43279
42938
|
constructor({
|
43280
|
-
|
42939
|
+
gasPrice,
|
43281
42940
|
maturity,
|
43282
42941
|
maxFee,
|
43283
42942
|
witnessLimit,
|
@@ -43285,7 +42944,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43285
42944
|
outputs,
|
43286
42945
|
witnesses
|
43287
42946
|
} = {}) {
|
43288
|
-
this.
|
42947
|
+
this.gasPrice = bn(gasPrice);
|
43289
42948
|
this.maturity = maturity ?? 0;
|
43290
42949
|
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
43291
42950
|
this.maxFee = maxFee ? bn(maxFee) : void 0;
|
@@ -43296,9 +42955,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43296
42955
|
static getPolicyMeta(req) {
|
43297
42956
|
let policyTypes = 0;
|
43298
42957
|
const policies = [];
|
43299
|
-
if (req.
|
43300
|
-
policyTypes += PolicyType.
|
43301
|
-
policies.push({ data: req.
|
42958
|
+
if (req.gasPrice) {
|
42959
|
+
policyTypes += PolicyType.GasPrice;
|
42960
|
+
policies.push({ data: req.gasPrice, type: PolicyType.GasPrice });
|
43302
42961
|
}
|
43303
42962
|
if (req.witnessLimit) {
|
43304
42963
|
policyTypes += PolicyType.WitnessLimit;
|
@@ -43486,9 +43145,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43486
43145
|
* @param predicateData - Predicate data bytes.
|
43487
43146
|
*/
|
43488
43147
|
addCoinInput(coin) {
|
43489
|
-
const { assetId, owner, amount } = coin;
|
43148
|
+
const { assetId, owner, amount, id, predicate } = coin;
|
43490
43149
|
let witnessIndex;
|
43491
|
-
if (
|
43150
|
+
if (predicate) {
|
43492
43151
|
witnessIndex = 0;
|
43493
43152
|
} else {
|
43494
43153
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(owner);
|
@@ -43497,13 +43156,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43497
43156
|
}
|
43498
43157
|
}
|
43499
43158
|
const input = {
|
43500
|
-
|
43159
|
+
id,
|
43501
43160
|
type: InputType.Coin,
|
43502
43161
|
owner: owner.toB256(),
|
43503
43162
|
amount,
|
43504
43163
|
assetId,
|
43505
43164
|
txPointer: "0x00000000000000000000000000000000",
|
43506
|
-
witnessIndex
|
43165
|
+
witnessIndex,
|
43166
|
+
predicate
|
43507
43167
|
};
|
43508
43168
|
this.pushInput(input);
|
43509
43169
|
this.addChangeOutput(owner, assetId);
|
@@ -43517,10 +43177,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43517
43177
|
* @param predicateData - Predicate data bytes.
|
43518
43178
|
*/
|
43519
43179
|
addMessageInput(message) {
|
43520
|
-
const { recipient, sender, amount } = message;
|
43180
|
+
const { recipient, sender, amount, predicate, nonce } = message;
|
43521
43181
|
const assetId = BaseAssetId;
|
43522
43182
|
let witnessIndex;
|
43523
|
-
if (
|
43183
|
+
if (predicate) {
|
43524
43184
|
witnessIndex = 0;
|
43525
43185
|
} else {
|
43526
43186
|
witnessIndex = this.getCoinInputWitnessIndexByOwner(recipient);
|
@@ -43529,12 +43189,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43529
43189
|
}
|
43530
43190
|
}
|
43531
43191
|
const input = {
|
43532
|
-
|
43192
|
+
nonce,
|
43533
43193
|
type: InputType.Message,
|
43534
43194
|
sender: sender.toB256(),
|
43535
43195
|
recipient: recipient.toB256(),
|
43536
43196
|
amount,
|
43537
|
-
witnessIndex
|
43197
|
+
witnessIndex,
|
43198
|
+
predicate
|
43538
43199
|
};
|
43539
43200
|
this.pushInput(input);
|
43540
43201
|
this.addChangeOutput(recipient, assetId);
|
@@ -43644,7 +43305,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43644
43305
|
}
|
43645
43306
|
calculateMaxGas(chainInfo, minGas) {
|
43646
43307
|
const { consensusParameters } = chainInfo;
|
43647
|
-
const { gasPerByte
|
43308
|
+
const { gasPerByte } = consensusParameters;
|
43648
43309
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
43649
43310
|
(acc, wit) => acc + wit.dataLength,
|
43650
43311
|
0
|
@@ -43653,8 +43314,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43653
43314
|
gasPerByte,
|
43654
43315
|
minGas,
|
43655
43316
|
witnessesLength,
|
43656
|
-
witnessLimit: this.witnessLimit
|
43657
|
-
maxGasPerTx
|
43317
|
+
witnessLimit: this.witnessLimit
|
43658
43318
|
});
|
43659
43319
|
}
|
43660
43320
|
/**
|
@@ -43672,20 +43332,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43672
43332
|
});
|
43673
43333
|
const updateAssetInput = (assetId, quantity) => {
|
43674
43334
|
const assetInput = findAssetInput(assetId);
|
43675
|
-
let usedQuantity = quantity;
|
43676
|
-
if (assetId === BaseAssetId) {
|
43677
|
-
usedQuantity = bn("1000000000000000000");
|
43678
|
-
}
|
43679
43335
|
if (assetInput && "assetId" in assetInput) {
|
43680
|
-
assetInput.id = hexlify(
|
43681
|
-
assetInput.amount =
|
43336
|
+
assetInput.id = hexlify(randomBytes22(UTXO_ID_LEN));
|
43337
|
+
assetInput.amount = quantity;
|
43682
43338
|
} else {
|
43683
43339
|
this.addResources([
|
43684
43340
|
{
|
43685
|
-
id: hexlify(
|
43686
|
-
amount:
|
43341
|
+
id: hexlify(randomBytes22(UTXO_ID_LEN)),
|
43342
|
+
amount: quantity,
|
43687
43343
|
assetId,
|
43688
43344
|
owner: resourcesOwner || Address.fromRandom(),
|
43345
|
+
maturity: 0,
|
43689
43346
|
blockCreated: bn(1),
|
43690
43347
|
txCreatedIdx: bn(1)
|
43691
43348
|
}
|
@@ -43717,7 +43374,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43717
43374
|
toJSON() {
|
43718
43375
|
return normalizeJSON(this);
|
43719
43376
|
}
|
43720
|
-
|
43377
|
+
updatePredicateInputs(inputs) {
|
43721
43378
|
this.inputs.forEach((i) => {
|
43722
43379
|
let correspondingInput;
|
43723
43380
|
switch (i.type) {
|
@@ -43739,15 +43396,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43739
43396
|
}
|
43740
43397
|
});
|
43741
43398
|
}
|
43742
|
-
shiftPredicateData() {
|
43743
|
-
this.inputs.forEach((input) => {
|
43744
|
-
if ("predicateData" in input && "paddPredicateData" in input && typeof input.paddPredicateData === "function") {
|
43745
|
-
input.predicateData = input.paddPredicateData(
|
43746
|
-
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
43747
|
-
);
|
43748
|
-
}
|
43749
|
-
});
|
43750
|
-
}
|
43751
43399
|
};
|
43752
43400
|
|
43753
43401
|
// src/providers/transaction-request/hash-transaction.ts
|
@@ -43881,8 +43529,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43881
43529
|
return {
|
43882
43530
|
type: TransactionType.Create,
|
43883
43531
|
...baseTransaction,
|
43532
|
+
bytecodeLength: baseTransaction.witnesses[bytecodeWitnessIndex].dataLength / 4,
|
43884
43533
|
bytecodeWitnessIndex,
|
43885
|
-
storageSlotsCount:
|
43534
|
+
storageSlotsCount: storageSlots.length,
|
43886
43535
|
salt: this.salt ? hexlify(this.salt) : ZeroBytes32,
|
43887
43536
|
storageSlots
|
43888
43537
|
};
|
@@ -43996,8 +43645,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43996
43645
|
type: TransactionType.Script,
|
43997
43646
|
scriptGasLimit: this.gasLimit,
|
43998
43647
|
...super.getBaseTransaction(),
|
43999
|
-
scriptLength:
|
44000
|
-
scriptDataLength:
|
43648
|
+
scriptLength: script.length,
|
43649
|
+
scriptDataLength: scriptData.length,
|
44001
43650
|
receiptsRoot: ZeroBytes32,
|
44002
43651
|
script: hexlify(script),
|
44003
43652
|
scriptData: hexlify(scriptData)
|
@@ -44061,7 +43710,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44061
43710
|
}
|
44062
43711
|
calculateMaxGas(chainInfo, minGas) {
|
44063
43712
|
const { consensusParameters } = chainInfo;
|
44064
|
-
const { gasPerByte
|
43713
|
+
const { gasPerByte } = consensusParameters;
|
44065
43714
|
const witnessesLength = this.toTransaction().witnesses.reduce(
|
44066
43715
|
(acc, wit) => acc + wit.dataLength,
|
44067
43716
|
0
|
@@ -44071,8 +43720,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44071
43720
|
minGas,
|
44072
43721
|
witnessesLength,
|
44073
43722
|
witnessLimit: this.witnessLimit,
|
44074
|
-
gasLimit: this.gasLimit
|
44075
|
-
maxGasPerTx
|
43723
|
+
gasLimit: this.gasLimit
|
44076
43724
|
});
|
44077
43725
|
}
|
44078
43726
|
/**
|
@@ -44145,29 +43793,13 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44145
43793
|
}
|
44146
43794
|
}
|
44147
43795
|
};
|
44148
|
-
var cacheTxInputsFromOwner = (inputs, owner) => inputs.reduce(
|
44149
|
-
(acc, input) => {
|
44150
|
-
if (input.type === InputType.Coin && input.owner === owner) {
|
44151
|
-
acc.utxos.push(input.id);
|
44152
|
-
}
|
44153
|
-
if (input.type === InputType.Message && input.recipient === owner) {
|
44154
|
-
acc.messages.push(input.nonce);
|
44155
|
-
}
|
44156
|
-
return acc;
|
44157
|
-
},
|
44158
|
-
{
|
44159
|
-
utxos: [],
|
44160
|
-
messages: []
|
44161
|
-
}
|
44162
|
-
);
|
44163
43796
|
|
44164
43797
|
// src/providers/transaction-summary/calculate-transaction-fee.ts
|
44165
43798
|
var calculateTransactionFee = (params) => {
|
44166
43799
|
const {
|
44167
|
-
|
43800
|
+
gasUsed,
|
44168
43801
|
rawPayload,
|
44169
|
-
|
44170
|
-
consensusParameters: { gasCosts, feeParams, maxGasPerTx }
|
43802
|
+
consensusParameters: { gasCosts, feeParams }
|
44171
43803
|
} = params;
|
44172
43804
|
const gasPerByte = bn(feeParams.gasPerByte);
|
44173
43805
|
const gasPriceFactor = bn(feeParams.gasPriceFactor);
|
@@ -44177,7 +43809,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44177
43809
|
return {
|
44178
43810
|
fee: bn(0),
|
44179
43811
|
minFee: bn(0),
|
44180
|
-
maxFee: bn(0)
|
43812
|
+
maxFee: bn(0),
|
43813
|
+
feeFromGasUsed: bn(0)
|
44181
43814
|
};
|
44182
43815
|
}
|
44183
43816
|
const { type: type3, witnesses, inputs, policies } = transaction;
|
@@ -44209,6 +43842,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44209
43842
|
metadataGas,
|
44210
43843
|
txBytesSize: transactionBytes.length
|
44211
43844
|
});
|
43845
|
+
const gasPrice = bn(policies.find((policy) => policy.type === PolicyType.GasPrice)?.data);
|
44212
43846
|
const witnessLimit = policies.find((policy) => policy.type === PolicyType.WitnessLimit)?.data;
|
44213
43847
|
const witnessesLength = witnesses.reduce((acc, wit) => acc + wit.dataLength, 0);
|
44214
43848
|
const maxGas = getMaxGas({
|
@@ -44216,25 +43850,17 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44216
43850
|
minGas,
|
44217
43851
|
witnessesLength,
|
44218
43852
|
gasLimit,
|
44219
|
-
witnessLimit
|
44220
|
-
maxGasPerTx
|
44221
|
-
});
|
44222
|
-
const minFee = calculateGasFee({
|
44223
|
-
gasPrice,
|
44224
|
-
gas: minGas,
|
44225
|
-
priceFactor: gasPriceFactor,
|
44226
|
-
tip
|
44227
|
-
});
|
44228
|
-
const maxFee = calculateGasFee({
|
44229
|
-
gasPrice,
|
44230
|
-
gas: maxGas,
|
44231
|
-
priceFactor: gasPriceFactor,
|
44232
|
-
tip
|
43853
|
+
witnessLimit
|
44233
43854
|
});
|
43855
|
+
const feeFromGasUsed = calculatePriceWithFactor(gasUsed, gasPrice, gasPriceFactor);
|
43856
|
+
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor);
|
43857
|
+
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor);
|
43858
|
+
const fee = minFee.add(feeFromGasUsed);
|
44234
43859
|
return {
|
43860
|
+
fee,
|
44235
43861
|
minFee,
|
44236
43862
|
maxFee,
|
44237
|
-
|
43863
|
+
feeFromGasUsed
|
44238
43864
|
};
|
44239
43865
|
};
|
44240
43866
|
|
@@ -44788,9 +44414,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44788
44414
|
gqlTransactionStatus,
|
44789
44415
|
abiMap = {},
|
44790
44416
|
maxInputs,
|
44791
|
-
gasCosts
|
44792
|
-
maxGasPerTx,
|
44793
|
-
gasPrice
|
44417
|
+
gasCosts
|
44794
44418
|
} = params;
|
44795
44419
|
const gasUsed = getGasUsedFromReceipts(receipts);
|
44796
44420
|
const rawPayload = hexlify(transactionBytes);
|
@@ -44804,14 +44428,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44804
44428
|
maxInputs
|
44805
44429
|
});
|
44806
44430
|
const typeName = getTransactionTypeName(transaction.type);
|
44807
|
-
const tip = bn(transaction.policies?.find((policy) => policy.type === PolicyType.Tip)?.data);
|
44808
44431
|
const { fee } = calculateTransactionFee({
|
44809
|
-
|
44432
|
+
gasUsed,
|
44810
44433
|
rawPayload,
|
44811
|
-
tip,
|
44812
44434
|
consensusParameters: {
|
44813
44435
|
gasCosts,
|
44814
|
-
maxGasPerTx,
|
44815
44436
|
feeParams: {
|
44816
44437
|
gasPerByte,
|
44817
44438
|
gasPriceFactor
|
@@ -44947,13 +44568,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44947
44568
|
const decodedTransaction = this.decodeTransaction(
|
44948
44569
|
transaction
|
44949
44570
|
);
|
44950
|
-
|
44951
|
-
|
44952
|
-
txReceipts = transaction.status.receipts;
|
44953
|
-
}
|
44954
|
-
const receipts = txReceipts.map(processGqlReceipt) || [];
|
44955
|
-
const { gasPerByte, gasPriceFactor, gasCosts, maxGasPerTx } = this.provider.getGasConfig();
|
44956
|
-
const gasPrice = await this.provider.getLatestGasPrice();
|
44571
|
+
const receipts = transaction.receipts?.map(processGqlReceipt) || [];
|
44572
|
+
const { gasPerByte, gasPriceFactor, gasCosts } = this.provider.getGasConfig();
|
44957
44573
|
const maxInputs = this.provider.getChain().consensusParameters.maxInputs;
|
44958
44574
|
const transactionSummary = assembleTransactionSummary({
|
44959
44575
|
id: this.id,
|
@@ -44965,9 +44581,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
44965
44581
|
gasPriceFactor,
|
44966
44582
|
abiMap: contractsAbiMap,
|
44967
44583
|
maxInputs,
|
44968
|
-
gasCosts
|
44969
|
-
maxGasPerTx,
|
44970
|
-
gasPrice
|
44584
|
+
gasCosts
|
44971
44585
|
});
|
44972
44586
|
return transactionSummary;
|
44973
44587
|
}
|
@@ -45116,7 +44730,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45116
44730
|
gasCosts,
|
45117
44731
|
latestBlock: {
|
45118
44732
|
id: latestBlock.id,
|
45119
|
-
height: bn(latestBlock.height),
|
44733
|
+
height: bn(latestBlock.header.height),
|
45120
44734
|
time: latestBlock.header.time,
|
45121
44735
|
transactions: latestBlock.transactions.map((i) => ({
|
45122
44736
|
id: i.id
|
@@ -45210,8 +44824,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45210
44824
|
* Returns some helpful parameters related to gas fees.
|
45211
44825
|
*/
|
45212
44826
|
getGasConfig() {
|
44827
|
+
const { minGasPrice } = this.getNode();
|
45213
44828
|
const { maxGasPerTx, maxGasPerPredicate, gasPriceFactor, gasPerByte, gasCosts } = this.getChain().consensusParameters;
|
45214
44829
|
return {
|
44830
|
+
minGasPrice,
|
45215
44831
|
maxGasPerTx,
|
45216
44832
|
maxGasPerPredicate,
|
45217
44833
|
gasPriceFactor,
|
@@ -45309,7 +44925,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45309
44925
|
*/
|
45310
44926
|
async getBlockNumber() {
|
45311
44927
|
const { chain } = await this.operations.getChain();
|
45312
|
-
return bn(chain.latestBlock.height, 10);
|
44928
|
+
return bn(chain.latestBlock.header.height, 10);
|
45313
44929
|
}
|
45314
44930
|
/**
|
45315
44931
|
* Returns the chain information.
|
@@ -45321,9 +44937,11 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45321
44937
|
const processedNodeInfo = {
|
45322
44938
|
maxDepth: bn(nodeInfo.maxDepth),
|
45323
44939
|
maxTx: bn(nodeInfo.maxTx),
|
44940
|
+
minGasPrice: bn(nodeInfo.minGasPrice),
|
45324
44941
|
nodeVersion: nodeInfo.nodeVersion,
|
45325
44942
|
utxoValidation: nodeInfo.utxoValidation,
|
45326
|
-
vmBacktrace: nodeInfo.vmBacktrace
|
44943
|
+
vmBacktrace: nodeInfo.vmBacktrace,
|
44944
|
+
peers: nodeInfo.peers
|
45327
44945
|
};
|
45328
44946
|
_Provider.nodeInfoCache[this.url] = processedNodeInfo;
|
45329
44947
|
return processedNodeInfo;
|
@@ -45409,13 +45027,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45409
45027
|
return this.estimateTxDependencies(transactionRequest);
|
45410
45028
|
}
|
45411
45029
|
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45412
|
-
const { dryRun:
|
45413
|
-
|
45030
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45031
|
+
encodedTransaction,
|
45414
45032
|
utxoValidation: utxoValidation || false
|
45415
45033
|
});
|
45416
|
-
const
|
45417
|
-
|
45418
|
-
|
45034
|
+
const receipts = gqlReceipts.map(processGqlReceipt);
|
45035
|
+
return {
|
45036
|
+
receipts
|
45037
|
+
};
|
45419
45038
|
}
|
45420
45039
|
/**
|
45421
45040
|
* Verifies whether enough gas is available to complete transaction.
|
@@ -45454,6 +45073,9 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45454
45073
|
* If there are missing variable outputs,
|
45455
45074
|
* `addVariableOutputs` is called on the transaction.
|
45456
45075
|
*
|
45076
|
+
* @privateRemarks
|
45077
|
+
* TODO: Investigate support for missing contract IDs
|
45078
|
+
* TODO: Add support for missing output messages
|
45457
45079
|
*
|
45458
45080
|
* @param transactionRequest - The transaction request object.
|
45459
45081
|
* @returns A promise.
|
@@ -45466,19 +45088,16 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45466
45088
|
missingContractIds: []
|
45467
45089
|
};
|
45468
45090
|
}
|
45091
|
+
await this.estimatePredicates(transactionRequest);
|
45469
45092
|
let receipts = [];
|
45470
45093
|
const missingContractIds = [];
|
45471
45094
|
let outputVariables = 0;
|
45472
|
-
let dryrunStatus;
|
45473
45095
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
45474
|
-
const {
|
45475
|
-
|
45476
|
-
} = await this.operations.dryRun({
|
45477
|
-
encodedTransactions: [hexlify(transactionRequest.toTransactionBytes())],
|
45096
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45097
|
+
encodedTransaction: hexlify(transactionRequest.toTransactionBytes()),
|
45478
45098
|
utxoValidation: false
|
45479
45099
|
});
|
45480
|
-
receipts =
|
45481
|
-
dryrunStatus = status;
|
45100
|
+
receipts = gqlReceipts.map(processGqlReceipt);
|
45482
45101
|
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(receipts);
|
45483
45102
|
const hasMissingOutputs = missingOutputVariables.length !== 0 || missingOutputContractIds.length !== 0;
|
45484
45103
|
if (hasMissingOutputs) {
|
@@ -45488,11 +45107,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45488
45107
|
transactionRequest.addContractInputAndOutput(Address.fromString(contractId));
|
45489
45108
|
missingContractIds.push(contractId);
|
45490
45109
|
});
|
45491
|
-
const { maxFee } = await this.estimateTxGasAndFee({
|
45492
|
-
transactionRequest,
|
45493
|
-
optimizeGas: false
|
45494
|
-
});
|
45495
|
-
transactionRequest.maxFee = maxFee;
|
45496
45110
|
} else {
|
45497
45111
|
break;
|
45498
45112
|
}
|
@@ -45500,133 +45114,37 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45500
45114
|
return {
|
45501
45115
|
receipts,
|
45502
45116
|
outputVariables,
|
45503
|
-
missingContractIds
|
45504
|
-
dryrunStatus
|
45117
|
+
missingContractIds
|
45505
45118
|
};
|
45506
45119
|
}
|
45507
45120
|
/**
|
45508
|
-
*
|
45509
|
-
*
|
45510
|
-
*
|
45511
|
-
|
45512
|
-
|
45513
|
-
|
45514
|
-
|
45515
|
-
* @returns A promise that resolves to an array of results for each transaction.
|
45516
|
-
*/
|
45517
|
-
async estimateMultipleTxDependencies(transactionRequests) {
|
45518
|
-
const results = transactionRequests.map(() => ({
|
45519
|
-
receipts: [],
|
45520
|
-
outputVariables: 0,
|
45521
|
-
missingContractIds: [],
|
45522
|
-
dryrunStatus: void 0
|
45523
|
-
}));
|
45524
|
-
const allRequests = clone_default(transactionRequests);
|
45525
|
-
const serializedTransactionsMap = /* @__PURE__ */ new Map();
|
45526
|
-
allRequests.forEach((req, index) => {
|
45527
|
-
if (req.type === TransactionType.Script) {
|
45528
|
-
serializedTransactionsMap.set(index, hexlify(req.toTransactionBytes()));
|
45529
|
-
}
|
45530
|
-
});
|
45531
|
-
let transactionsToProcess = Array.from(serializedTransactionsMap.keys());
|
45532
|
-
let attempt = 0;
|
45533
|
-
while (transactionsToProcess.length > 0 && attempt < MAX_RETRIES) {
|
45534
|
-
const encodedTransactions = transactionsToProcess.map(
|
45535
|
-
(index) => serializedTransactionsMap.get(index)
|
45536
|
-
);
|
45537
|
-
const dryRunResults = await this.operations.dryRun({
|
45538
|
-
encodedTransactions,
|
45539
|
-
utxoValidation: false
|
45540
|
-
});
|
45541
|
-
const nextRoundTransactions = [];
|
45542
|
-
for (let i = 0; i < dryRunResults.dryRun.length; i++) {
|
45543
|
-
const currentResultIndex = transactionsToProcess[i];
|
45544
|
-
const { receipts: rawReceipts, status } = dryRunResults.dryRun[i];
|
45545
|
-
results[currentResultIndex].receipts = rawReceipts.map(processGqlReceipt);
|
45546
|
-
results[currentResultIndex].dryrunStatus = status;
|
45547
|
-
const { missingOutputVariables, missingOutputContractIds } = getReceiptsWithMissingData(
|
45548
|
-
results[currentResultIndex].receipts
|
45549
|
-
);
|
45550
|
-
const hasMissingOutputs = missingOutputVariables.length > 0 || missingOutputContractIds.length > 0;
|
45551
|
-
const requestToProcess = allRequests[currentResultIndex];
|
45552
|
-
if (hasMissingOutputs && requestToProcess?.type === TransactionType.Script) {
|
45553
|
-
results[currentResultIndex].outputVariables += missingOutputVariables.length;
|
45554
|
-
requestToProcess.addVariableOutputs(missingOutputVariables.length);
|
45555
|
-
missingOutputContractIds.forEach(({ contractId }) => {
|
45556
|
-
requestToProcess.addContractInputAndOutput(Address.fromString(contractId));
|
45557
|
-
results[currentResultIndex].missingContractIds.push(contractId);
|
45558
|
-
});
|
45559
|
-
const { maxFee } = await this.estimateTxGasAndFee({
|
45560
|
-
transactionRequest: requestToProcess,
|
45561
|
-
optimizeGas: false
|
45562
|
-
});
|
45563
|
-
requestToProcess.maxFee = maxFee;
|
45564
|
-
serializedTransactionsMap.set(
|
45565
|
-
currentResultIndex,
|
45566
|
-
hexlify(requestToProcess.toTransactionBytes())
|
45567
|
-
);
|
45568
|
-
nextRoundTransactions.push(currentResultIndex);
|
45569
|
-
allRequests[currentResultIndex] = requestToProcess;
|
45570
|
-
}
|
45571
|
-
}
|
45572
|
-
transactionsToProcess = nextRoundTransactions;
|
45573
|
-
attempt += 1;
|
45574
|
-
}
|
45575
|
-
return results;
|
45576
|
-
}
|
45577
|
-
async dryRunMultipleTransactions(transactionRequests, { utxoValidation, estimateTxDependencies = true } = {}) {
|
45578
|
-
if (estimateTxDependencies) {
|
45579
|
-
return this.estimateMultipleTxDependencies(transactionRequests);
|
45580
|
-
}
|
45581
|
-
const encodedTransactions = transactionRequests.map((tx) => hexlify(tx.toTransactionBytes()));
|
45582
|
-
const { dryRun: dryRunStatuses } = await this.operations.dryRun({
|
45583
|
-
encodedTransactions,
|
45584
|
-
utxoValidation: utxoValidation || false
|
45585
|
-
});
|
45586
|
-
const results = dryRunStatuses.map(({ receipts: rawReceipts, status }) => {
|
45587
|
-
const receipts = rawReceipts.map(processGqlReceipt);
|
45588
|
-
return { receipts, dryrunStatus: status };
|
45589
|
-
});
|
45590
|
-
return results;
|
45591
|
-
}
|
45592
|
-
async estimateTxGasAndFee(params) {
|
45593
|
-
const { transactionRequest, optimizeGas = true } = params;
|
45594
|
-
let { gasPrice } = params;
|
45121
|
+
* Estimates the transaction gas and fee based on the provided transaction request.
|
45122
|
+
* @param transactionRequest - The transaction request object.
|
45123
|
+
* @returns An object containing the estimated minimum gas, minimum fee, maximum gas, and maximum fee.
|
45124
|
+
*/
|
45125
|
+
estimateTxGasAndFee(params) {
|
45126
|
+
const { transactionRequest } = params;
|
45127
|
+
const { gasPriceFactor, minGasPrice, maxGasPerTx } = this.getGasConfig();
|
45595
45128
|
const chainInfo = this.getChain();
|
45596
|
-
const
|
45129
|
+
const gasPrice = transactionRequest.gasPrice.eq(0) ? minGasPrice : transactionRequest.gasPrice;
|
45130
|
+
transactionRequest.gasPrice = gasPrice;
|
45597
45131
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
45598
|
-
|
45599
|
-
gasPrice = await this.estimateGasPrice(10);
|
45600
|
-
}
|
45601
|
-
const minFee = calculateGasFee({
|
45602
|
-
gasPrice: bn(gasPrice),
|
45603
|
-
gas: minGas,
|
45604
|
-
priceFactor: gasPriceFactor,
|
45605
|
-
tip: transactionRequest.tip
|
45606
|
-
}).add(1);
|
45607
|
-
let gasLimit = bn(0);
|
45132
|
+
const minFee = calculatePriceWithFactor(minGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45608
45133
|
if (transactionRequest.type === TransactionType.Script) {
|
45609
|
-
|
45610
|
-
if (!optimizeGas) {
|
45134
|
+
if (transactionRequest.gasLimit.eq(0)) {
|
45611
45135
|
transactionRequest.gasLimit = minGas;
|
45612
|
-
gasLimit =
|
45613
|
-
|
45136
|
+
transactionRequest.gasLimit = maxGasPerTx.sub(
|
45137
|
+
transactionRequest.calculateMaxGas(chainInfo, minGas)
|
45138
|
+
);
|
45614
45139
|
}
|
45615
45140
|
}
|
45616
45141
|
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
45617
|
-
const maxFee =
|
45618
|
-
gasPrice: bn(gasPrice),
|
45619
|
-
gas: maxGas,
|
45620
|
-
priceFactor: gasPriceFactor,
|
45621
|
-
tip: transactionRequest.tip
|
45622
|
-
}).add(1);
|
45142
|
+
const maxFee = calculatePriceWithFactor(maxGas, gasPrice, gasPriceFactor).normalizeZeroToOne();
|
45623
45143
|
return {
|
45624
45144
|
minGas,
|
45625
45145
|
minFee,
|
45626
45146
|
maxGas,
|
45627
|
-
maxFee
|
45628
|
-
gasPrice,
|
45629
|
-
gasLimit
|
45147
|
+
maxFee
|
45630
45148
|
};
|
45631
45149
|
}
|
45632
45150
|
/**
|
@@ -45644,17 +45162,15 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45644
45162
|
if (estimateTxDependencies) {
|
45645
45163
|
return this.estimateTxDependencies(transactionRequest);
|
45646
45164
|
}
|
45647
|
-
const
|
45648
|
-
const { dryRun:
|
45649
|
-
|
45165
|
+
const encodedTransaction = hexlify(transactionRequest.toTransactionBytes());
|
45166
|
+
const { dryRun: gqlReceipts } = await this.operations.dryRun({
|
45167
|
+
encodedTransaction,
|
45650
45168
|
utxoValidation: true
|
45651
45169
|
});
|
45652
|
-
const
|
45653
|
-
|
45654
|
-
|
45655
|
-
|
45656
|
-
});
|
45657
|
-
return { receipts: callResult[0].receipts };
|
45170
|
+
const receipts = gqlReceipts.map(processGqlReceipt);
|
45171
|
+
return {
|
45172
|
+
receipts
|
45173
|
+
};
|
45658
45174
|
}
|
45659
45175
|
/**
|
45660
45176
|
* Returns a transaction cost to enable user
|
@@ -45671,80 +45187,77 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45671
45187
|
* @param tolerance - The tolerance to add on top of the gasUsed.
|
45672
45188
|
* @returns A promise that resolves to the transaction cost object.
|
45673
45189
|
*/
|
45674
|
-
async getTransactionCost(transactionRequestLike,
|
45190
|
+
async getTransactionCost(transactionRequestLike, forwardingQuantities = [], {
|
45191
|
+
estimateTxDependencies = true,
|
45192
|
+
estimatePredicates = true,
|
45193
|
+
resourcesOwner,
|
45194
|
+
signatureCallback
|
45195
|
+
} = {}) {
|
45675
45196
|
const txRequestClone = clone_default(transactionRequestify(transactionRequestLike));
|
45197
|
+
const { minGasPrice } = this.getGasConfig();
|
45198
|
+
const setGasPrice = max(txRequestClone.gasPrice, minGasPrice);
|
45676
45199
|
const isScriptTransaction = txRequestClone.type === TransactionType.Script;
|
45677
45200
|
const coinOutputsQuantities = txRequestClone.getCoinOutputsQuantities();
|
45678
|
-
const allQuantities = mergeQuantities(coinOutputsQuantities,
|
45201
|
+
const allQuantities = mergeQuantities(coinOutputsQuantities, forwardingQuantities);
|
45679
45202
|
txRequestClone.fundWithFakeUtxos(allQuantities, resourcesOwner?.address);
|
45680
|
-
txRequestClone.maxFee = bn(0);
|
45681
45203
|
if (isScriptTransaction) {
|
45682
45204
|
txRequestClone.gasLimit = bn(0);
|
45683
45205
|
}
|
45684
|
-
if (
|
45685
|
-
resourcesOwner
|
45206
|
+
if (estimatePredicates) {
|
45207
|
+
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
45208
|
+
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
45209
|
+
}
|
45210
|
+
await this.estimatePredicates(txRequestClone);
|
45686
45211
|
}
|
45687
|
-
const signedRequest = clone_default(txRequestClone);
|
45688
|
-
let addedSignatures = 0;
|
45689
45212
|
if (signatureCallback && isScriptTransaction) {
|
45690
|
-
|
45691
|
-
|
45692
|
-
|
45693
|
-
|
45694
|
-
await this.estimatePredicates(signedRequest);
|
45695
|
-
let { maxFee, maxGas, minFee, minGas, gasPrice, gasLimit } = await this.estimateTxGasAndFee({
|
45696
|
-
transactionRequest: signedRequest,
|
45697
|
-
optimizeGas: false
|
45213
|
+
await signatureCallback(txRequestClone);
|
45214
|
+
}
|
45215
|
+
let { maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
|
45216
|
+
transactionRequest: txRequestClone
|
45698
45217
|
});
|
45699
|
-
txRequestClone.maxFee = maxFee;
|
45700
45218
|
let receipts = [];
|
45701
45219
|
let missingContractIds = [];
|
45702
45220
|
let outputVariables = 0;
|
45703
45221
|
let gasUsed = bn(0);
|
45704
|
-
|
45705
|
-
|
45706
|
-
if (signatureCallback) {
|
45707
|
-
await signatureCallback(txRequestClone);
|
45708
|
-
}
|
45709
|
-
txRequestClone.gasLimit = gasLimit;
|
45222
|
+
if (isScriptTransaction && estimateTxDependencies) {
|
45223
|
+
txRequestClone.gasPrice = bn(0);
|
45710
45224
|
const result = await this.estimateTxDependencies(txRequestClone);
|
45711
45225
|
receipts = result.receipts;
|
45712
45226
|
outputVariables = result.outputVariables;
|
45713
45227
|
missingContractIds = result.missingContractIds;
|
45714
|
-
gasUsed = getGasUsedFromReceipts(receipts);
|
45228
|
+
gasUsed = isScriptTransaction ? getGasUsedFromReceipts(receipts) : gasUsed;
|
45715
45229
|
txRequestClone.gasLimit = gasUsed;
|
45716
|
-
|
45717
|
-
|
45718
|
-
|
45230
|
+
txRequestClone.gasPrice = setGasPrice;
|
45231
|
+
({ maxFee, maxGas, minFee, minGas } = this.estimateTxGasAndFee({
|
45232
|
+
transactionRequest: txRequestClone
|
45719
45233
|
}));
|
45720
45234
|
}
|
45721
45235
|
return {
|
45722
45236
|
requiredQuantities: allQuantities,
|
45723
45237
|
receipts,
|
45724
45238
|
gasUsed,
|
45725
|
-
|
45239
|
+
minGasPrice,
|
45240
|
+
gasPrice: setGasPrice,
|
45726
45241
|
minGas,
|
45727
45242
|
maxGas,
|
45728
45243
|
minFee,
|
45729
45244
|
maxFee,
|
45245
|
+
estimatedInputs: txRequestClone.inputs,
|
45730
45246
|
outputVariables,
|
45731
|
-
missingContractIds
|
45732
|
-
addedSignatures,
|
45733
|
-
estimatedPredicates: txRequestClone.inputs
|
45247
|
+
missingContractIds
|
45734
45248
|
};
|
45735
45249
|
}
|
45736
|
-
async getResourcesForTransaction(owner, transactionRequestLike,
|
45250
|
+
async getResourcesForTransaction(owner, transactionRequestLike, forwardingQuantities = []) {
|
45737
45251
|
const ownerAddress = Address.fromAddressOrString(owner);
|
45738
45252
|
const transactionRequest = transactionRequestify(clone_default(transactionRequestLike));
|
45739
|
-
const transactionCost = await this.getTransactionCost(transactionRequest,
|
45740
|
-
quantitiesToContract
|
45741
|
-
});
|
45253
|
+
const transactionCost = await this.getTransactionCost(transactionRequest, forwardingQuantities);
|
45742
45254
|
transactionRequest.addResources(
|
45743
45255
|
await this.getResourcesToSpend(ownerAddress, transactionCost.requiredQuantities)
|
45744
45256
|
);
|
45745
|
-
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45746
|
-
|
45747
|
-
|
45257
|
+
const { requiredQuantities, ...txCost } = await this.getTransactionCost(
|
45258
|
+
transactionRequest,
|
45259
|
+
forwardingQuantities
|
45260
|
+
);
|
45748
45261
|
const resources = await this.getResourcesToSpend(ownerAddress, requiredQuantities);
|
45749
45262
|
return {
|
45750
45263
|
resources,
|
@@ -45768,6 +45281,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45768
45281
|
assetId: coin.assetId,
|
45769
45282
|
amount: bn(coin.amount),
|
45770
45283
|
owner: Address.fromAddressOrString(coin.owner),
|
45284
|
+
maturity: bn(coin.maturity).toNumber(),
|
45771
45285
|
blockCreated: bn(coin.blockCreated),
|
45772
45286
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45773
45287
|
}));
|
@@ -45819,6 +45333,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45819
45333
|
amount: bn(coin.amount),
|
45820
45334
|
assetId: coin.assetId,
|
45821
45335
|
owner: Address.fromAddressOrString(coin.owner),
|
45336
|
+
maturity: bn(coin.maturity).toNumber(),
|
45822
45337
|
blockCreated: bn(coin.blockCreated),
|
45823
45338
|
txCreatedIdx: bn(coin.txCreatedIdx)
|
45824
45339
|
};
|
@@ -45851,7 +45366,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45851
45366
|
}
|
45852
45367
|
return {
|
45853
45368
|
id: block2.id,
|
45854
|
-
height: bn(block2.height),
|
45369
|
+
height: bn(block2.header.height),
|
45855
45370
|
time: block2.header.time,
|
45856
45371
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45857
45372
|
};
|
@@ -45866,7 +45381,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45866
45381
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
45867
45382
|
const blocks = fetchedData.edges.map(({ node: block2 }) => ({
|
45868
45383
|
id: block2.id,
|
45869
|
-
height: bn(block2.height),
|
45384
|
+
height: bn(block2.header.height),
|
45870
45385
|
time: block2.header.time,
|
45871
45386
|
transactionIds: block2.transactions.map((tx) => tx.id)
|
45872
45387
|
}));
|
@@ -45893,7 +45408,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
45893
45408
|
}
|
45894
45409
|
return {
|
45895
45410
|
id: block2.id,
|
45896
|
-
height: bn(block2.height, 10),
|
45411
|
+
height: bn(block2.header.height, 10),
|
45897
45412
|
time: block2.header.time,
|
45898
45413
|
transactionIds: block2.transactions.map((tx) => tx.id),
|
45899
45414
|
transactions: block2.transactions.map(
|
@@ -46073,11 +45588,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46073
45588
|
prevRoot: messageBlockHeader.prevRoot,
|
46074
45589
|
time: messageBlockHeader.time,
|
46075
45590
|
applicationHash: messageBlockHeader.applicationHash,
|
46076
|
-
|
46077
|
-
|
46078
|
-
consensusParametersVersion: messageBlockHeader.consensusParametersVersion,
|
46079
|
-
eventInboxRoot: messageBlockHeader.eventInboxRoot,
|
46080
|
-
stateTransitionBytecodeVersion: messageBlockHeader.stateTransitionBytecodeVersion
|
45591
|
+
messageReceiptRoot: messageBlockHeader.messageReceiptRoot,
|
45592
|
+
messageReceiptCount: bn(messageBlockHeader.messageReceiptCount)
|
46081
45593
|
},
|
46082
45594
|
commitBlockHeader: {
|
46083
45595
|
id: commitBlockHeader.id,
|
@@ -46088,11 +45600,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46088
45600
|
prevRoot: commitBlockHeader.prevRoot,
|
46089
45601
|
time: commitBlockHeader.time,
|
46090
45602
|
applicationHash: commitBlockHeader.applicationHash,
|
46091
|
-
|
46092
|
-
|
46093
|
-
consensusParametersVersion: commitBlockHeader.consensusParametersVersion,
|
46094
|
-
eventInboxRoot: commitBlockHeader.eventInboxRoot,
|
46095
|
-
stateTransitionBytecodeVersion: commitBlockHeader.stateTransitionBytecodeVersion
|
45603
|
+
messageReceiptRoot: commitBlockHeader.messageReceiptRoot,
|
45604
|
+
messageReceiptCount: bn(commitBlockHeader.messageReceiptCount)
|
46096
45605
|
},
|
46097
45606
|
sender: Address.fromAddressOrString(sender),
|
46098
45607
|
recipient: Address.fromAddressOrString(recipient),
|
@@ -46101,16 +45610,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46101
45610
|
data
|
46102
45611
|
};
|
46103
45612
|
}
|
46104
|
-
async getLatestGasPrice() {
|
46105
|
-
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
46106
|
-
return bn(latestGasPrice.gasPrice);
|
46107
|
-
}
|
46108
|
-
async estimateGasPrice(blockHorizon) {
|
46109
|
-
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
46110
|
-
blockHorizon: String(blockHorizon)
|
46111
|
-
});
|
46112
|
-
return bn(estimateGasPrice.gasPrice);
|
46113
|
-
}
|
46114
45613
|
/**
|
46115
45614
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
46116
45615
|
*
|
@@ -46394,33 +45893,36 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46394
45893
|
* @param fee - The estimated transaction fee.
|
46395
45894
|
* @returns A promise that resolves when the resources are added to the transaction.
|
46396
45895
|
*/
|
46397
|
-
async fund(request,
|
46398
|
-
const
|
46399
|
-
const txRequest = request;
|
46400
|
-
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
45896
|
+
async fund(request, coinQuantities, fee) {
|
45897
|
+
const updatedQuantities = addAmountToAsset({
|
46401
45898
|
amount: bn(fee),
|
46402
45899
|
assetId: BaseAssetId,
|
46403
|
-
coinQuantities
|
45900
|
+
coinQuantities
|
46404
45901
|
});
|
46405
45902
|
const quantitiesDict = {};
|
46406
|
-
|
45903
|
+
updatedQuantities.forEach(({ amount, assetId }) => {
|
46407
45904
|
quantitiesDict[assetId] = {
|
46408
45905
|
required: amount,
|
46409
45906
|
owned: bn(0)
|
46410
45907
|
};
|
46411
45908
|
});
|
46412
|
-
|
45909
|
+
const cachedUtxos = [];
|
45910
|
+
const cachedMessages = [];
|
45911
|
+
const owner = this.address.toB256();
|
45912
|
+
request.inputs.forEach((input) => {
|
46413
45913
|
const isResource = "amount" in input;
|
46414
45914
|
if (isResource) {
|
46415
45915
|
const isCoin2 = "owner" in input;
|
46416
45916
|
if (isCoin2) {
|
46417
45917
|
const assetId = String(input.assetId);
|
46418
|
-
if (quantitiesDict[assetId]) {
|
45918
|
+
if (input.owner === owner && quantitiesDict[assetId]) {
|
46419
45919
|
const amount = bn(input.amount);
|
46420
45920
|
quantitiesDict[assetId].owned = quantitiesDict[assetId].owned.add(amount);
|
45921
|
+
cachedUtxos.push(input.id);
|
46421
45922
|
}
|
46422
|
-
} else if (input.amount && quantitiesDict[BaseAssetId]) {
|
45923
|
+
} else if (input.recipient === owner && input.amount && quantitiesDict[BaseAssetId]) {
|
46423
45924
|
quantitiesDict[BaseAssetId].owned = quantitiesDict[BaseAssetId].owned.add(input.amount);
|
45925
|
+
cachedMessages.push(input.nonce);
|
46424
45926
|
}
|
46425
45927
|
}
|
46426
45928
|
});
|
@@ -46435,23 +45937,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46435
45937
|
});
|
46436
45938
|
const needsToBeFunded = missingQuantities.length;
|
46437
45939
|
if (needsToBeFunded) {
|
46438
|
-
const
|
46439
|
-
|
46440
|
-
|
46441
|
-
|
46442
|
-
|
46443
|
-
txRequest.updatePredicateGasUsed(estimatedPredicates);
|
46444
|
-
const requestToBeReEstimate = clone_default(txRequest);
|
46445
|
-
if (addedSignatures) {
|
46446
|
-
Array.from({ length: addedSignatures }).forEach(
|
46447
|
-
() => requestToBeReEstimate.addEmptyWitness()
|
46448
|
-
);
|
45940
|
+
const resources = await this.getResourcesToSpend(missingQuantities, {
|
45941
|
+
messages: cachedMessages,
|
45942
|
+
utxos: cachedUtxos
|
45943
|
+
});
|
45944
|
+
request.addResources(resources);
|
46449
45945
|
}
|
46450
|
-
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
46451
|
-
transactionRequest: requestToBeReEstimate
|
46452
|
-
});
|
46453
|
-
txRequest.maxFee = maxFee;
|
46454
|
-
return txRequest;
|
46455
45946
|
}
|
46456
45947
|
/**
|
46457
45948
|
* A helper that creates a transfer transaction request and returns it.
|
@@ -46459,25 +45950,28 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46459
45950
|
* @param destination - The address of the destination.
|
46460
45951
|
* @param amount - The amount of coins to transfer.
|
46461
45952
|
* @param assetId - The asset ID of the coins to transfer.
|
46462
|
-
* @param txParams - The transaction parameters (gasLimit,
|
45953
|
+
* @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
|
46463
45954
|
* @returns A promise that resolves to the prepared transaction request.
|
46464
45955
|
*/
|
46465
45956
|
async createTransfer(destination, amount, assetId = BaseAssetId, txParams = {}) {
|
46466
|
-
const
|
45957
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
45958
|
+
const params = { gasPrice: minGasPrice, ...txParams };
|
45959
|
+
const request = new ScriptTransactionRequest(params);
|
46467
45960
|
request.addCoinOutput(Address.fromAddressOrString(destination), amount, assetId);
|
46468
|
-
const
|
45961
|
+
const { maxFee, requiredQuantities, gasUsed, estimatedInputs } = await this.provider.getTransactionCost(request, [], {
|
46469
45962
|
estimateTxDependencies: true,
|
46470
45963
|
resourcesOwner: this
|
46471
45964
|
});
|
46472
|
-
|
46473
|
-
|
46474
|
-
|
46475
|
-
|
46476
|
-
|
46477
|
-
|
46478
|
-
|
46479
|
-
|
46480
|
-
await this.fund(request,
|
45965
|
+
request.gasPrice = bn(txParams.gasPrice ?? minGasPrice);
|
45966
|
+
request.gasLimit = bn(txParams.gasLimit ?? gasUsed);
|
45967
|
+
this.validateGas({
|
45968
|
+
gasUsed,
|
45969
|
+
gasPrice: request.gasPrice,
|
45970
|
+
gasLimit: request.gasLimit,
|
45971
|
+
minGasPrice
|
45972
|
+
});
|
45973
|
+
await this.fund(request, requiredQuantities, maxFee);
|
45974
|
+
request.updatePredicateInputs(estimatedInputs);
|
46481
45975
|
return request;
|
46482
45976
|
}
|
46483
45977
|
/**
|
@@ -46516,30 +46010,31 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46516
46010
|
);
|
46517
46011
|
}
|
46518
46012
|
const contractAddress = Address.fromAddressOrString(contractId);
|
46013
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
46014
|
+
const params = { gasPrice: minGasPrice, ...txParams };
|
46519
46015
|
const { script, scriptData } = await assembleTransferToContractScript({
|
46520
46016
|
hexlifiedContractId: contractAddress.toB256(),
|
46521
46017
|
amountToTransfer: bn(amount),
|
46522
46018
|
assetId
|
46523
46019
|
});
|
46524
46020
|
const request = new ScriptTransactionRequest({
|
46525
|
-
...
|
46021
|
+
...params,
|
46526
46022
|
script,
|
46527
46023
|
scriptData
|
46528
46024
|
});
|
46529
46025
|
request.addContractInputAndOutput(contractAddress);
|
46530
|
-
const
|
46531
|
-
|
46532
|
-
|
46026
|
+
const { maxFee, requiredQuantities, gasUsed } = await this.provider.getTransactionCost(
|
46027
|
+
request,
|
46028
|
+
[{ amount: bn(amount), assetId: String(assetId) }]
|
46029
|
+
);
|
46030
|
+
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46031
|
+
this.validateGas({
|
46032
|
+
gasUsed,
|
46033
|
+
gasPrice: request.gasPrice,
|
46034
|
+
gasLimit: request.gasLimit,
|
46035
|
+
minGasPrice
|
46533
46036
|
});
|
46534
|
-
|
46535
|
-
this.validateGas({
|
46536
|
-
gasUsed: txCost.gasUsed,
|
46537
|
-
gasLimit: request.gasLimit
|
46538
|
-
});
|
46539
|
-
}
|
46540
|
-
request.gasLimit = txCost.gasUsed;
|
46541
|
-
request.maxFee = txCost.maxFee;
|
46542
|
-
await this.fund(request, txCost);
|
46037
|
+
await this.fund(request, requiredQuantities, maxFee);
|
46543
46038
|
return this.sendTransaction(request);
|
46544
46039
|
}
|
46545
46040
|
/**
|
@@ -46551,6 +46046,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46551
46046
|
* @returns A promise that resolves to the transaction response.
|
46552
46047
|
*/
|
46553
46048
|
async withdrawToBaseLayer(recipient, amount, txParams = {}) {
|
46049
|
+
const { minGasPrice } = this.provider.getGasConfig();
|
46554
46050
|
const recipientAddress = Address.fromAddressOrString(recipient);
|
46555
46051
|
const recipientDataArray = arrayify(
|
46556
46052
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
@@ -46563,19 +46059,21 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46563
46059
|
...recipientDataArray,
|
46564
46060
|
...amountDataArray
|
46565
46061
|
]);
|
46566
|
-
const params = { script, ...txParams };
|
46062
|
+
const params = { script, gasPrice: minGasPrice, ...txParams };
|
46567
46063
|
const request = new ScriptTransactionRequest(params);
|
46568
|
-
const
|
46569
|
-
const
|
46570
|
-
|
46571
|
-
|
46572
|
-
|
46573
|
-
|
46574
|
-
|
46575
|
-
|
46576
|
-
|
46577
|
-
|
46578
|
-
|
46064
|
+
const forwardingQuantities = [{ amount: bn(amount), assetId: BaseAssetId }];
|
46065
|
+
const { requiredQuantities, maxFee, gasUsed } = await this.provider.getTransactionCost(
|
46066
|
+
request,
|
46067
|
+
forwardingQuantities
|
46068
|
+
);
|
46069
|
+
request.gasLimit = bn(params.gasLimit ?? gasUsed);
|
46070
|
+
this.validateGas({
|
46071
|
+
gasUsed,
|
46072
|
+
gasPrice: request.gasPrice,
|
46073
|
+
gasLimit: request.gasLimit,
|
46074
|
+
minGasPrice
|
46075
|
+
});
|
46076
|
+
await this.fund(request, requiredQuantities, maxFee);
|
46579
46077
|
return this.sendTransaction(request);
|
46580
46078
|
}
|
46581
46079
|
async signMessage(message) {
|
@@ -46633,7 +46131,18 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
46633
46131
|
}
|
46634
46132
|
return this.provider.simulate(transactionRequest, { estimateTxDependencies: false });
|
46635
46133
|
}
|
46636
|
-
validateGas({
|
46134
|
+
validateGas({
|
46135
|
+
gasUsed,
|
46136
|
+
gasPrice,
|
46137
|
+
gasLimit,
|
46138
|
+
minGasPrice
|
46139
|
+
}) {
|
46140
|
+
if (minGasPrice.gt(gasPrice)) {
|
46141
|
+
throw new FuelError(
|
46142
|
+
ErrorCode.GAS_PRICE_TOO_LOW,
|
46143
|
+
`Gas price '${gasPrice}' is lower than the required: '${minGasPrice}'.`
|
46144
|
+
);
|
46145
|
+
}
|
46637
46146
|
if (gasUsed.gt(gasLimit)) {
|
46638
46147
|
throw new FuelError(
|
46639
46148
|
ErrorCode.GAS_LIMIT_TOO_LOW,
|
@@ -48222,7 +47731,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
48222
47731
|
* @param transactionRequestLike - The transaction request to send.
|
48223
47732
|
* @returns A promise that resolves to the TransactionResponse object.
|
48224
47733
|
*/
|
48225
|
-
async sendTransaction(transactionRequestLike, { estimateTxDependencies =
|
47734
|
+
async sendTransaction(transactionRequestLike, { estimateTxDependencies = true, awaitExecution } = {}) {
|
48226
47735
|
const transactionRequest = transactionRequestify(transactionRequestLike);
|
48227
47736
|
if (estimateTxDependencies) {
|
48228
47737
|
await this.provider.estimateTxDependencies(transactionRequest);
|
@@ -50982,15 +50491,14 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
50982
50491
|
process.env.GENESIS_SECRET || randomBytes22(32),
|
50983
50492
|
wallet.provider
|
50984
50493
|
);
|
50985
|
-
const
|
50986
|
-
|
50987
|
-
|
50988
|
-
|
50494
|
+
const resources = await genesisWallet.getResourcesToSpend(quantities);
|
50495
|
+
const { minGasPrice } = genesisWallet.provider.getGasConfig();
|
50496
|
+
const request = new ScriptTransactionRequest({
|
50497
|
+
gasLimit: 1e4,
|
50498
|
+
gasPrice: minGasPrice
|
50989
50499
|
});
|
50990
|
-
|
50991
|
-
request.
|
50992
|
-
request.maxFee = txCost.maxFee;
|
50993
|
-
await genesisWallet.fund(request, txCost);
|
50500
|
+
request.addResources(resources);
|
50501
|
+
quantities.map(coinQuantityfy).forEach(({ amount, assetId }) => request.addCoinOutput(wallet.address, amount, assetId));
|
50994
50502
|
await genesisWallet.sendTransaction(request, { awaitExecution: true });
|
50995
50503
|
};
|
50996
50504
|
|
@@ -51069,12 +50577,12 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51069
50577
|
// eslint-disable-next-line no-async-promise-executor
|
51070
50578
|
new Promise(async (resolve, reject) => {
|
51071
50579
|
const remainingArgs = extractRemainingArgs(args, [
|
51072
|
-
"--
|
50580
|
+
"--chain",
|
51073
50581
|
"--consensus-key",
|
51074
50582
|
"--db-type",
|
51075
50583
|
"--poa-instant"
|
51076
50584
|
]);
|
51077
|
-
const chainConfigPath = getFlagValueFromArgs(args, "--
|
50585
|
+
const chainConfigPath = getFlagValueFromArgs(args, "--chain");
|
51078
50586
|
const consensusKey = getFlagValueFromArgs(args, "--consensus-key") || defaultConsensusKey;
|
51079
50587
|
const dbTypeFlagValue = getFlagValueFromArgs(args, "--db-type");
|
51080
50588
|
const useInMemoryDb = dbTypeFlagValue === "in-memory" || dbTypeFlagValue === void 0;
|
@@ -51093,54 +50601,36 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51093
50601
|
let chainConfigPathToUse;
|
51094
50602
|
const prefix = basePath || import_os.default.tmpdir();
|
51095
50603
|
const suffix = basePath ? "" : (0, import_crypto21.randomUUID)();
|
51096
|
-
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix
|
50604
|
+
const tempDirPath = import_path8.default.join(prefix, ".fuels", suffix);
|
51097
50605
|
if (chainConfigPath) {
|
51098
50606
|
chainConfigPathToUse = chainConfigPath;
|
51099
50607
|
} else {
|
51100
50608
|
if (!(0, import_fs2.existsSync)(tempDirPath)) {
|
51101
50609
|
(0, import_fs2.mkdirSync)(tempDirPath, { recursive: true });
|
51102
50610
|
}
|
51103
|
-
|
51104
|
-
|
51105
|
-
stateConfigJson = {
|
51106
|
-
...stateConfigJson,
|
51107
|
-
coins: [
|
51108
|
-
...stateConfigJson.coins.map((coin) => ({
|
51109
|
-
...coin,
|
51110
|
-
amount: "18446744073709551615"
|
51111
|
-
}))
|
51112
|
-
],
|
51113
|
-
messages: stateConfigJson.messages.map((message) => ({
|
51114
|
-
...message,
|
51115
|
-
amount: "18446744073709551615"
|
51116
|
-
}))
|
51117
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51118
|
-
};
|
50611
|
+
const tempChainConfigFilePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
50612
|
+
let chainConfig = defaultChainConfig;
|
51119
50613
|
if (!process.env.GENESIS_SECRET) {
|
51120
50614
|
const pk = Signer.generatePrivateKey();
|
51121
50615
|
const signer = new Signer(pk);
|
51122
50616
|
process.env.GENESIS_SECRET = hexlify(pk);
|
51123
|
-
|
51124
|
-
|
51125
|
-
|
51126
|
-
|
51127
|
-
|
51128
|
-
|
51129
|
-
|
51130
|
-
|
51131
|
-
|
51132
|
-
|
50617
|
+
chainConfig = {
|
50618
|
+
...defaultChainConfig,
|
50619
|
+
initial_state: {
|
50620
|
+
...defaultChainConfig.initial_state,
|
50621
|
+
coins: [
|
50622
|
+
...defaultChainConfig.initial_state.coins,
|
50623
|
+
{
|
50624
|
+
owner: signer.address.toHexString(),
|
50625
|
+
amount: toHex(1e9),
|
50626
|
+
asset_id: BaseAssetId
|
50627
|
+
}
|
50628
|
+
]
|
50629
|
+
}
|
50630
|
+
};
|
51133
50631
|
}
|
51134
|
-
|
51135
|
-
|
51136
|
-
fixedStateConfigJSON = fixedStateConfigJSON.replace(regexMakeNumber, "$1$2");
|
51137
|
-
const chainConfigWritePath = import_path8.default.join(tempDirPath, "chainConfig.json");
|
51138
|
-
const stateConfigWritePath = import_path8.default.join(tempDirPath, "stateConfig.json");
|
51139
|
-
const metadataWritePath = import_path8.default.join(tempDirPath, "metadata.json");
|
51140
|
-
(0, import_fs2.writeFileSync)(chainConfigWritePath, JSON.stringify(chainConfigJson), "utf8");
|
51141
|
-
(0, import_fs2.writeFileSync)(stateConfigWritePath, fixedStateConfigJSON, "utf8");
|
51142
|
-
(0, import_fs2.writeFileSync)(metadataWritePath, JSON.stringify(metadataJson), "utf8");
|
51143
|
-
chainConfigPathToUse = tempDirPath;
|
50632
|
+
(0, import_fs2.writeFileSync)(tempChainConfigFilePath, JSON.stringify(chainConfig), "utf8");
|
50633
|
+
chainConfigPathToUse = tempChainConfigFilePath;
|
51144
50634
|
}
|
51145
50635
|
const child = (0, import_child_process.spawn)(
|
51146
50636
|
command,
|
@@ -51149,10 +50639,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51149
50639
|
["--ip", ipToUse],
|
51150
50640
|
["--port", portToUse],
|
51151
50641
|
useInMemoryDb ? ["--db-type", "in-memory"] : ["--db-path", tempDirPath],
|
51152
|
-
["--min-gas-price", "
|
50642
|
+
["--min-gas-price", "0"],
|
51153
50643
|
poaInstant ? ["--poa-instant", "true"] : [],
|
51154
50644
|
["--consensus-key", consensusKey],
|
51155
|
-
["--
|
50645
|
+
["--chain", chainConfigPathToUse],
|
51156
50646
|
"--vm-backtrace",
|
51157
50647
|
"--utxo-validation",
|
51158
50648
|
"--debug",
|
@@ -51211,7 +50701,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
51211
50701
|
walletCount = 10
|
51212
50702
|
} = {}) => {
|
51213
50703
|
const { cleanup: closeNode, ip, port } = await launchNode(launchNodeOptions || {});
|
51214
|
-
const provider = await Provider.create(`http://${ip}:${port}/
|
50704
|
+
const provider = await Provider.create(`http://${ip}:${port}/graphql`);
|
51215
50705
|
const wallets = await generateWallets(walletCount, provider);
|
51216
50706
|
const cleanup = () => {
|
51217
50707
|
closeNode();
|