[Blockchain Watcher] (XLAYER) Map xlayer redeems (#1435)
* Map xlayer redeems * Map redeem job for testnet * Change blockBatchSize * Mao xkayer on contractsMapperConfig --------- Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Pro.local>
This commit is contained in:
parent
9a749f0b0c
commit
534fbbb47c
|
@ -188,6 +188,13 @@
|
|||
"__format": "json"
|
||||
}
|
||||
},
|
||||
"xlayer": {
|
||||
"network": "XLAYER_NETWORK",
|
||||
"rpcs": {
|
||||
"__name": "XLAYER_RPCS",
|
||||
"__format": "json"
|
||||
}
|
||||
},
|
||||
"polygon-sepolia": {
|
||||
"network": "POLYGON_SEPOLIA_NETWORK",
|
||||
"rpcs": {
|
||||
|
|
|
@ -188,7 +188,14 @@
|
|||
"name": "blast",
|
||||
"network": "testnet",
|
||||
"chainId": 36,
|
||||
"rpcs": ["https://sepolia.blast.io"],
|
||||
"rpcs": ["https://blast-sepolia.drpc.org"],
|
||||
"timeout": 10000
|
||||
},
|
||||
"xlayer": {
|
||||
"name": "xlayer",
|
||||
"network": "testnet",
|
||||
"chainId": 37,
|
||||
"rpcs": ["https://xlayertestrpc.okx.com", "https://testrpc.xlayer.tech"],
|
||||
"timeout": 10000
|
||||
},
|
||||
"ethereum-sepolia": {
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
"network": "mainnet",
|
||||
"rpcs": [
|
||||
"https://eth-rpc-karura.aca-api.network",
|
||||
"https://eth-rpc-karura.aca-staging.network",
|
||||
"https://rpc.evm.karura.network"
|
||||
"https://eth-rpc-karura.aca-staging.network"
|
||||
]
|
||||
},
|
||||
"acala": {
|
||||
|
@ -146,5 +145,9 @@
|
|||
"network": "mainnet",
|
||||
"rpcs": ["https://rpc.ankr.com/"]
|
||||
}
|
||||
},
|
||||
"xlayer": {
|
||||
"network": "mainnet",
|
||||
"rpcs": ["https://xlayerrpc.okx.com", "https://rpc.xlayer.tech"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1679,6 +1679,36 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"chain": "xlayer",
|
||||
"protocols": [
|
||||
{
|
||||
"addresses": [
|
||||
"0x5537857664B0f9eFe38C9f320F75fEf23234D904",
|
||||
"0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"
|
||||
],
|
||||
"type": "Token Bridge",
|
||||
"methods": [
|
||||
{
|
||||
"methodId": "0xc6878519",
|
||||
"method": "MethodCompleteTransfer"
|
||||
},
|
||||
{
|
||||
"methodId": "0xff200cde",
|
||||
"method": "MethodCompleteAndUnwrapETH"
|
||||
},
|
||||
{
|
||||
"methodId": "0xe8059810",
|
||||
"method": "MethodCreateWrapped"
|
||||
},
|
||||
{
|
||||
"methodId": "0xf768441f",
|
||||
"method": "MethodUpdateWrapped"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ const EVM_CHAINS = new Map([
|
|||
["polygon-sepolia", "polygon-evmRepo"],
|
||||
["blast", "evmRepo"],
|
||||
["mantle", "evmRepo"],
|
||||
["xlayer", "evmRepo"],
|
||||
]);
|
||||
|
||||
const POOL_STRATEGY = "weighted";
|
||||
|
|
|
@ -110,6 +110,9 @@ describe("RepositoriesBuilder", () => {
|
|||
expect(repos.getEvmBlockRepository("mantle")).toBeInstanceOf(
|
||||
RateLimitedEvmJsonRPCBlockRepository
|
||||
);
|
||||
expect(repos.getEvmBlockRepository("xlayer")).toBeInstanceOf(
|
||||
RateLimitedEvmJsonRPCBlockRepository
|
||||
);
|
||||
expect(repos.getAptosRepository()).toBeInstanceOf(RateLimitedAptosJsonRPCBlockRepository);
|
||||
expect(repos.getMetadataRepository()).toBeInstanceOf(FileMetadataRepository);
|
||||
expect(repos.getSnsEventRepository()).toBeInstanceOf(SnsEventRepository);
|
||||
|
|
|
@ -129,6 +129,13 @@ export const configMock = (): Config => {
|
|||
rpcs: ["http://localhost"],
|
||||
timeout: 10000,
|
||||
},
|
||||
xlayer: {
|
||||
name: "xlayer",
|
||||
network: "testnet",
|
||||
chainId: 37,
|
||||
rpcs: ["http://localhost"],
|
||||
timeout: 10000,
|
||||
},
|
||||
"ethereum-sepolia": {
|
||||
name: "ethereum-sepolia",
|
||||
network: "sepolia",
|
||||
|
|
|
@ -657,6 +657,10 @@ spec:
|
|||
- name: SUI_RPCS
|
||||
value: '{{ .SUI_RPCS }}'
|
||||
{{ end }}
|
||||
{{ if .KARURA_RPCS }}
|
||||
- name: KARURA_RPCS
|
||||
value: '{{ .KARURA_RPCS }}'
|
||||
{{ end }}
|
||||
image: {{ .IMAGE_NAME }}
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
@ -125,6 +125,36 @@ data:
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "poll-log-message-published-xlayer",
|
||||
"chain": "xlayer",
|
||||
"source": {
|
||||
"action": "PollEvm",
|
||||
"config": {
|
||||
"blockBatchSize": 1,
|
||||
"commitment": "latest",
|
||||
"interval": 5000,
|
||||
"addresses": ["0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],
|
||||
"chain": "xlayer",
|
||||
"chainId": 37
|
||||
}
|
||||
},
|
||||
"handlers": [
|
||||
{
|
||||
"action": "HandleEvmLogs",
|
||||
"target": "sns",
|
||||
"mapper": "evmLogMessagePublishedMapper",
|
||||
"config": {
|
||||
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
||||
"filter": {
|
||||
"addresses": ["0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],
|
||||
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
|
||||
},
|
||||
"metricName": "process_source_event"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
mainnet-jobs.json: |-
|
||||
|
@ -188,6 +218,36 @@ data:
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "poll-log-message-published-xlayer",
|
||||
"chain": "xlayer",
|
||||
"source": {
|
||||
"action": "PollEvm",
|
||||
"config": {
|
||||
"blockBatchSize": 1,
|
||||
"commitment": "latest",
|
||||
"interval": 5000,
|
||||
"addresses": ["0x194B123c5E96B9b2E49763619985790Dc241CAC0"],
|
||||
"chain": "xlayer",
|
||||
"chainId": 37
|
||||
}
|
||||
},
|
||||
"handlers": [
|
||||
{
|
||||
"action": "HandleEvmLogs",
|
||||
"target": "sns",
|
||||
"mapper": "evmLogMessagePublishedMapper",
|
||||
"config": {
|
||||
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
||||
"filter": {
|
||||
"addresses": ["0x194B123c5E96B9b2E49763619985790Dc241CAC0"],
|
||||
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
|
||||
},
|
||||
"metricName": "process_source_event"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
---
|
||||
|
@ -248,6 +308,10 @@ spec:
|
|||
- name: ETHEREUM_HOLESKY_RPCS
|
||||
value: '{{ .ETHEREUM_HOLESKY_RPCS }}'
|
||||
{{ end }}
|
||||
{{ if .XLAYER_RPCS }}
|
||||
- name: XLAYER_RPCS
|
||||
value: '{{ .XLAYER_RPCS }}'
|
||||
{{ end }}
|
||||
image: {{ .IMAGE_NAME }}
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
@ -132,6 +132,46 @@ data:
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "poll-redeemed-transactions-xlayer",
|
||||
"chain": "xlayer",
|
||||
"source": {
|
||||
"action": "PollEvm",
|
||||
"records": "GetEvmTransactions",
|
||||
"config": {
|
||||
"blockBatchSize": 1,
|
||||
"commitment": "latest",
|
||||
"interval": 5000,
|
||||
"addresses": [
|
||||
"0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"
|
||||
],
|
||||
"chain": "xlayer",
|
||||
"chainId": 37,
|
||||
"topics": [
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
|
||||
]
|
||||
}
|
||||
},
|
||||
"handlers": [
|
||||
{
|
||||
"action": "HandleEvmTransactions",
|
||||
"target": "sns",
|
||||
"mapper": "evmRedeemedTransactionFoundMapper",
|
||||
"config": {
|
||||
"abi": "",
|
||||
"filter": {
|
||||
"addresses": [
|
||||
"0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"
|
||||
],
|
||||
"topics": [
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
|
||||
]
|
||||
},
|
||||
"metricName": "process_vaa_event"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
mainnet-jobs.json: |-
|
||||
|
@ -243,6 +283,48 @@ data:
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "poll-redeemed-transactions-xlayer",
|
||||
"chain": "xlayer",
|
||||
"source": {
|
||||
"action": "PollEvm",
|
||||
"records": "GetEvmTransactions",
|
||||
"config": {
|
||||
"blockBatchSize": 1,
|
||||
"commitment": "latest",
|
||||
"interval": 5000,
|
||||
"addresses": [
|
||||
"0x5537857664B0f9eFe38C9f320F75fEf23234D904"
|
||||
],
|
||||
"chain": "xlayer",
|
||||
"chainId": 37,
|
||||
"topics": [
|
||||
"0xcaf280c8cfeba144da67230d9b009c8f868a75bac9a528fa0474be1ba317c169",
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
|
||||
]
|
||||
}
|
||||
},
|
||||
"handlers": [
|
||||
{
|
||||
"action": "HandleEvmTransactions",
|
||||
"target": "sns",
|
||||
"mapper": "evmRedeemedTransactionFoundMapper",
|
||||
"config": {
|
||||
"abi": "",
|
||||
"filter": {
|
||||
"addresses": [
|
||||
"0x5537857664B0f9eFe38C9f320F75fEf23234D904"
|
||||
],
|
||||
"topics": [
|
||||
"0xcaf280c8cfeba144da67230d9b009c8f868a75bac9a528fa0474be1ba317c169",
|
||||
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
|
||||
]
|
||||
},
|
||||
"metricName": "process_vaa_event"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
---
|
||||
|
@ -295,6 +377,10 @@ spec:
|
|||
- name: BLAST_RPCS
|
||||
value: '{{ .BLAST_RPCS }}'
|
||||
{{ end }}
|
||||
{{ if .XLAYER_RPCS }}
|
||||
- name: XLAYER_RPCS
|
||||
value: '{{ .XLAYER_RPCS }}'
|
||||
{{ end }}
|
||||
image: {{ .IMAGE_NAME }}
|
||||
resources:
|
||||
limits:
|
||||
|
|
Loading…
Reference in New Issue