File tree Expand file tree Collapse file tree 3 files changed +33
-36
lines changed Expand file tree Collapse file tree 3 files changed +33
-36
lines changed Original file line number Diff line number Diff line change 1
1
version : ' 3.9'
2
2
3
3
services :
4
- mandala-node :
5
- image : ghcr.io/acalanetwork/mandala-node:sha-89ef1e5
6
- ports :
7
- - 9944:9944
8
- healthcheck :
9
- test : " curl --fail -X POST -H \" Content-Type: application/json\" http://localhost:9944 -d \" {\" jsonrpc\" : \" 2.0\" }\" || exit 1"
10
- interval : 10s
11
- retries : 10
12
- start_period : 30s
13
- command :
14
- - --dev
15
- - -lruntime=debug
16
- - -levm=debug
17
- - --rpc-external
18
- - --rpc-cors=all
19
- - --rpc-methods=unsafe
20
- - --pruning=archive
21
- - --instant-sealing
22
- - --tmp
23
-
24
4
postgres :
25
5
image : postgres:12-alpine
6
+ container_name : postgres
26
7
ports :
27
8
- 5432:5432
28
- volumes :
29
- - postgres:/var/lib/postgresql/data
30
9
environment :
31
10
POSTGRES_PASSWORD : postgres
11
+ healthcheck :
12
+ test : ["CMD-SHELL", "pg_isready -U postgres"]
13
+ interval : 5s
14
+ timeout : 5s
15
+ retries : 5
32
16
33
17
subquery-node :
34
- image : onfinality /subql-node:v1.21.2
18
+ image : subquerynetwork /subql-node-substrate:v3.10.1
35
19
depends_on :
36
20
postgres :
37
- condition : service_started
38
- mandala-node :
39
21
condition : service_healthy
40
22
ports :
41
23
- 3000:3000
@@ -49,20 +31,28 @@ services:
49
31
volumes :
50
32
- ./:/app
51
33
command :
52
- - -f=/app
53
- - --network-endpoint=ws ://mandala-node:9944
34
+ - -f=/app/project-acala.yaml
35
+ - --network-endpoint=wss ://acala-rpc.aca-api.network
54
36
- --db-schema=acala_evm
55
37
- --log-level=debug
56
38
- --unsafe
57
39
- --disable-historical
40
+ - --batch-size=1
41
+ healthcheck :
42
+ test : ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
43
+ interval : 3s
44
+ timeout : 5s
45
+ retries : 10
58
46
59
47
graphql-engine :
60
- image : onfinality /subql-query:v1.4 .0
48
+ image : subquerynetwork /subql-query:v2.10 .0
61
49
ports :
62
50
- 3001:3001
63
51
depends_on :
64
- - postgres
65
- - subquery-node
52
+ postgres :
53
+ condition : service_healthy
54
+ subquery-node :
55
+ condition : service_healthy
66
56
restart : always
67
57
environment :
68
58
DB_USER : postgres
Original file line number Diff line number Diff line change 1
- //Exports all handler functions
1
+ // https://github.com/subquery/subql/issues/1277#issuecomment-1404181415
2
+ import { atob } from 'abab' ;
3
+ global . atob = atob as any ;
4
+
2
5
export * from './mappings/mappingHandlers' ;
Original file line number Diff line number Diff line change 1
1
import '@subql/types/dist/global' ;
2
2
import { SubstrateBlock } from '@subql/types' ;
3
- import { parseReceiptsFromBlockData } from '@acala-network/eth-providers/utils ' ;
3
+ import { parseReceiptsFromBlockData } from '@acala-network/eth-providers' ;
4
4
5
5
export const handleBlock = async ( substrateBlock : SubstrateBlock ) : Promise < void > => {
6
+ if ( ! unsafeApi ) {
7
+ logger . error ( 'Unsafe API is not available' ) ;
8
+ }
9
+
6
10
const receipts = await parseReceiptsFromBlockData (
7
- unsafeApi ,
11
+ unsafeApi ! ,
8
12
substrateBlock ,
9
13
substrateBlock . events ,
10
14
) ;
11
15
12
16
const blockNumber = substrateBlock . block . header . number . toBigInt ( ) ;
13
17
const timestamp = substrateBlock . timestamp ;
14
- const receiptEntities = [ ] ;
15
- const logEntities = [ ] ;
18
+ const receiptEntities : any [ ] = [ ] ;
19
+ const logEntities : any [ ] = [ ] ;
16
20
17
21
receipts . forEach ( ( receipt , idx ) => {
18
22
const receiptId = `${ receipt . blockNumber . toString ( ) } -${ idx } ` ;
@@ -25,7 +29,7 @@ export const handleBlock = async (substrateBlock: SubstrateBlock): Promise<void>
25
29
cumulativeGasUsed : receipt . cumulativeGasUsed . toBigInt ( ) ,
26
30
effectiveGasPrice : receipt . effectiveGasPrice . toBigInt ( ) ,
27
31
type : BigInt ( receipt . type ) ,
28
- status : BigInt ( receipt . status ) ,
32
+ status : BigInt ( receipt . status ! ) ,
29
33
transactionIndex,
30
34
blockNumber,
31
35
timestamp,
You can’t perform that action at this time.
0 commit comments