@sentio/sdk 3.0.0-rc-next.4 → 3.0.0-rc.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"global-processor.d.ts","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAiC,eAAe,EAAE,MAAM,YAAY,CAAA;AAC3G,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAGrD,OAAO,EAAoD,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAuB,MAAM,qBAAqB,CAAA;AAK9E,KAAK,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,KAAK,CAAC,CAAA;AAE7E,qBAAa,mBAAoB,YAAW,iBAAiB,CAAC,yBAAyB,CAAC;IAkB1E,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAjBtD,UAAU,EAAE,WAAW,CAAC,oBAAoB,CAAC,EAAE,CAAK;IACpD,aAAa,UAAK;IAElB,OAAO,CAAC,QAAQ,CAAU;IAE1B,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,GAAG,mBAAmB;gBAY9C,MAAM,EAAE,yBAAyB;IAIhD,SAAS;IAIR,aAAa,CAClB,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACjF,MAAM,GAAE,eAA2C;CAsCtD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FuelProcessorState } from './types.js';
|
|
2
|
+
import { bn } from 'fuels';
|
|
2
3
|
import { getProvider } from './network.js';
|
|
3
4
|
import { decodeFuelTransaction, DEFAULT_FUEL_FETCH_CONFIG } from './transaction.js';
|
|
4
5
|
import { FuelContext } from './context.js';
|
|
@@ -40,7 +41,14 @@ export class FuelGlobalProcessor {
|
|
|
40
41
|
console.error('error decoding transaction', e);
|
|
41
42
|
return mergeProcessResults([]);
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
+
const header = call.transaction?.status.block.header;
|
|
45
|
+
const ctx = new FuelContext(this.config.chainId, ALL_ADDRESS, this.config.name ?? '*', call.timestamp || new Date(0), tx, header
|
|
46
|
+
? {
|
|
47
|
+
header: {
|
|
48
|
+
daHeight: bn(header.daHeight)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
: null);
|
|
44
52
|
await handler(tx, ctx);
|
|
45
53
|
return ctx.stopAndGetResult();
|
|
46
54
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-processor.js","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"global-processor.js","sourceRoot":"","sources":["../../src/fuel/global-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,kBAAkB,EAAmB,MAAM,YAAY,CAAA;AAE3G,OAAO,EAAY,EAAE,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAmB,MAAM,kBAAkB,CAAA;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAuB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAA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AAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAA;gBACpD,MAAM,GAAG,GAAG,IAAI,WAAW,CACzB,IAAI,CAAC,MAAM,CAAC,OAAO,EACnB,WAAW,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EACvB,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAC7B,EAAE,EACF,MAAM;oBACJ,CAAC,CAAE;wBACC,MAAM,EAAE;4BACN,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;yBAC9B;qBACY;oBACjB,CAAC,CAAC,IAAI,CACT,CAAA;gBACD,MAAM,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;gBACtB,OAAO,GAAG,CAAC,gBAAgB,EAAE,CAAA;YAC/B,CAAC;YACD,WAAW,EAAE;gBACX,OAAO,EAAE,EAAE;gBACX,GAAG,MAAM;aACV;SACF,CAAA;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/sdk",
|
|
3
|
-
"version": "3.0.0-rc
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@sentio/abi-wan-kanabi": "2.2.2-1",
|
|
67
67
|
"@sentio/api": "1.0.2",
|
|
68
68
|
"@sentio/bigdecimal": "9.1.1-patch.3",
|
|
69
|
-
"@sentio/chain": "~3.4.
|
|
69
|
+
"@sentio/chain": "~3.4.11",
|
|
70
70
|
"@sentio/ethers-v6": "^1.0.29",
|
|
71
71
|
"@solana/web3.js": "^1.98.3",
|
|
72
72
|
"@typemove/aptos": "~1.13.3",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"nice-grpc-common": "^2.0.2",
|
|
89
89
|
"nice-grpc-prometheus": "^0.2.2",
|
|
90
90
|
"node-fetch": "^3.3.2",
|
|
91
|
-
"p-queue": "^
|
|
91
|
+
"p-queue": "^9.0.0",
|
|
92
92
|
"piscina": "^5.1.3",
|
|
93
93
|
"radash": "^12.0.0",
|
|
94
94
|
"reflect-metadata": "^0.2.2",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"typechain": "^8.3.2",
|
|
98
98
|
"utility-types": "^3.11.0",
|
|
99
99
|
"yaml": "^2.3.4",
|
|
100
|
-
"@sentio/runtime": "^3.0.0-rc
|
|
101
|
-
"@sentio/protos": "3.0.0-rc
|
|
100
|
+
"@sentio/runtime": "^3.0.0-rc.1",
|
|
101
|
+
"@sentio/protos": "3.0.0-rc.1"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@sentio/tsup": "^8.3.5-rc.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CallHandler, FuelBaseProcessor, FuelProcessorState, FuelTransaction } from './types.js'
|
|
1
|
+
import { CallHandler, FuelBaseProcessor, FuelBlock, FuelProcessorState, FuelTransaction } from './types.js'
|
|
2
2
|
import { Data_FuelTransaction } from '@sentio/protos'
|
|
3
|
-
import { Provider } from 'fuels'
|
|
3
|
+
import { Provider, bn } from 'fuels'
|
|
4
4
|
import { getProvider } from './network.js'
|
|
5
5
|
import { decodeFuelTransaction, DEFAULT_FUEL_FETCH_CONFIG, FuelFetchConfig } from './transaction.js'
|
|
6
6
|
import { FuelContext } from './context.js'
|
|
@@ -51,13 +51,20 @@ export class FuelGlobalProcessor implements FuelBaseProcessor<GlobalFuelProcesso
|
|
|
51
51
|
console.error('error decoding transaction', e)
|
|
52
52
|
return mergeProcessResults([])
|
|
53
53
|
}
|
|
54
|
+
const header = call.transaction?.status.block.header
|
|
54
55
|
const ctx = new FuelContext(
|
|
55
56
|
this.config.chainId,
|
|
56
57
|
ALL_ADDRESS,
|
|
57
58
|
this.config.name ?? '*',
|
|
58
59
|
call.timestamp || new Date(0),
|
|
59
60
|
tx,
|
|
60
|
-
|
|
61
|
+
header
|
|
62
|
+
? ({
|
|
63
|
+
header: {
|
|
64
|
+
daHeight: bn(header.daHeight)
|
|
65
|
+
}
|
|
66
|
+
} as FuelBlock)
|
|
67
|
+
: null
|
|
61
68
|
)
|
|
62
69
|
await handler(tx, ctx)
|
|
63
70
|
return ctx.stopAndGetResult()
|