[Blockchain Watcher] (SCROLL) Mapped scroll source and target events (#1304)

* Mapped scroll source and target events

* Remove jobs for mainnet

* Remove jobs for mainnet

* Mapped redeem contract

* Add aptos custom env

---------

Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Pro.local>
This commit is contained in:
Julian 2024-04-15 16:48:56 -03:00 committed by GitHub
parent af4b03d1c3
commit 6b67bf859e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 126 additions and 0 deletions

View File

@ -172,6 +172,13 @@
"__name": "APTOS_RPCS",
"__format": "json"
}
},
"scroll": {
"network": "SCROLL_NETWORK",
"rpcs": {
"__name": "SCROLL_RPCS",
"__format": "json"
}
}
}
}

View File

@ -162,6 +162,19 @@
],
"timeout": 10000
},
"scroll": {
"name": "scroll",
"network": "testnet",
"chainId": 34,
"rpcs": [
"https://scroll-public.scroll-testnet.quiknode.pro",
"https://sepolia-rpc.scroll.io",
"https://scroll-testnet-public.unifra.io",
"https://scroll-sepolia.blockpi.network/v1/rpc/public",
"https://scroll-sepolia.chainstacklabs.com"
],
"timeout": 10000
},
"ethereum-sepolia": {
"name": "ethereum-sepolia",
"network": "sepolia",

View File

@ -117,6 +117,15 @@
"aptos": {
"network": "mainnet",
"rpcs": ["https://fullnode.mainnet.aptoslabs.com/v1"]
},
"scroll": {
"network": "mainnet",
"rpcs": [
"https://scroll-mainnet-public.unifra.io",
"https://rpc.scroll.io",
"https://scroll-mainnet.chainstacklabs.com",
"https://scroll-mainnet.public.blastapi.io"
]
}
}
}

View File

@ -53,6 +53,7 @@ const EVM_CHAINS = new Map([
["moonbeam", "moonbeam-evmRepo"],
["polygon", "polygon-evmRepo"],
["ethereum-holesky", "evmRepo"],
["scroll", "evmRepo"],
]);
const POOL_STRATEGY = "weighted";

View File

@ -97,6 +97,9 @@ describe("RepositoriesBuilder", () => {
expect(repos.getEvmBlockRepository("ethereum-holesky")).toBeInstanceOf(
RateLimitedEvmJsonRPCBlockRepository
);
expect(repos.getEvmBlockRepository("scroll")).toBeInstanceOf(
RateLimitedEvmJsonRPCBlockRepository
);
expect(repos.getAptosRepository()).toBeInstanceOf(RateLimitedAptosJsonRPCBlockRepository);
expect(repos.getMetadataRepository()).toBeInstanceOf(FileMetadataRepository);
expect(repos.getSnsEventRepository()).toBeInstanceOf(SnsEventRepository);

View File

@ -108,6 +108,13 @@ export const configMock = (): Config => {
rpcs: ["http://localhost"],
timeout: 10000,
},
scroll: {
name: "scroll",
network: "testnet",
chainId: 34,
rpcs: ["http://localhost"],
timeout: 10000,
},
"ethereum-sepolia": {
name: "ethereum-sepolia",
network: "sepolia",

View File

@ -755,6 +755,10 @@ spec:
- name: AVALANCHE_RPCS
value: '{{ .AVALANCHE_RPCS }}'
{{ end }}
{{ if .APTOS_RPCS }}
- name: APTOS_RPCS
value: '{{ .APTOS_RPCS }}'
{{ end }}
resources:
limits:
memory: {{ .RESOURCES_LIMITS_MEMORY }}

View File

@ -245,6 +245,36 @@ data:
}
}
]
},
{
"id": "poll-log-message-published-scroll",
"chain": "scroll",
"source": {
"action": "PollEvm",
"config": {
"blockBatchSize": 100,
"commitment": "latest",
"interval": 15000,
"addresses": ["0x055f47f1250012c6b20c436570a76e52c17af2d5"],
"chain": "scroll",
"chainId": 34
}
},
"handlers": [
{
"action": "HandleEvmLogs",
"target": "sns",
"mapper": "evmLogMessagePublishedMapper",
"config": {
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
"filter": {
"addresses": ["0x055f47f1250012c6b20c436570a76e52c17af2d5"],
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
},
"metricName": "process_source_event"
}
}
]
}
]
mainnet-jobs.json: |-
@ -534,6 +564,10 @@ spec:
- name: CELO_RPCS
value: '{{ .CELO_RPCS }}'
{{ end }}
{{ if .SCROLL_RPCS }}
- name: SCROLL_RPCS
value: '{{ .SCROLL_RPCS }}'
{{ end }}
resources:
limits:
memory: {{ .RESOURCES_LIMITS_MEMORY }}

View File

@ -242,6 +242,46 @@ data:
}
}
]
},
{
"id": "poll-redeemed-transactions-scroll",
"chain": "scroll",
"source": {
"action": "PollEvm",
"records": "GetEvmTransactions",
"config": {
"blockBatchSize": 100,
"commitment": "latest",
"interval": 5000,
"addresses": [
"0x22427d90b7da3fa4642f7025a854c7254e4e45bf"
],
"chain": "scroll",
"chainId": 34,
"topics": [
]
}
},
"handlers": [
{
"action": "HandleEvmTransactions",
"target": "sns",
"mapper": "evmRedeemedTransactionFoundMapper",
"config": {
"abi": "",
"filter": {
"addresses": [
"0x22427d90b7da3fa4642f7025a854c7254e4e45bf"
],
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
},
"metricName": "process_vaa_event"
}
}
]
}
]
mainnet-jobs.json: |-
@ -556,6 +596,14 @@ spec:
- name: CELO_RPCS
value: '{{ .CELO_RPCS }}'
{{ end }}
{{ if .APTOS_RPCS }}
- name: APTOS_RPCS
value: '{{ .APTOS_RPCS }}'
{{ end }}
{{ if .SCROLL_RPCS }}
- name: SCROLL_RPCS
value: '{{ .SCROLL_RPCS }}'
{{ end }}
resources:
limits:
memory: {{ .RESOURCES_LIMITS_MEMORY }}