[Blockchain Watcher] (POLYGON AMOY) Map polygon amoy (#1350)

* Map polygon amoy

* Map polygon amoy

* Map env for yaml

* Map polygon goerli job

* Map contractsMapperConfig

---------

Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Pro.local>
This commit is contained in:
Julian 2024-04-24 15:06:41 -03:00 committed by GitHub
parent eb3a0a10dc
commit f0799cdd67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 170 additions and 0 deletions

View File

@ -180,5 +180,12 @@
"__format": "json"
}
}
},
"polygon-sepolia": {
"network": "POLYGON_SEPOLIA_NETWORK",
"rpcs": {
"__name": "POLYGON_SEPOLIA_RPCS",
"__format": "json"
}
}
}

View File

@ -210,6 +210,13 @@
"rpcs": ["https://rpc.ankr.com/eth_holesky"],
"timeout": 10000
},
"polygon-sepolia": {
"name": "polygon-sepolia",
"network": "sepolia",
"chainId": 10007,
"rpcs": ["https://rpc-amoy.polygon.technology/"],
"timeout": 10000
},
"wormchain": {
"name": "wormchain",
"network": "testnet",

View File

@ -1412,6 +1412,47 @@
]
}
]
},
{
"chain": "polygon-sepolia",
"protocols": [
{
"addresses": ["0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],
"type": "Token Bridge",
"methods": [
{
"methodId": "0xc6878519",
"method": "MethodCompleteTransfer"
},
{
"methodId": "0xff200cde",
"method": "MethodCompleteAndUnwrapETH"
},
{
"methodId": "0xe8059810",
"method": "MethodCreateWrapped"
},
{
"methodId": "0xf768441f",
"method": "MethodUpdateWrapped"
}
]
},
{
"addresses": ["0x23908A62110e21C04F3A4e011d24F901F911744A"],
"type": "NFT",
"methods": [
{
"methodId": "02",
"method": "completeNativeInstruction"
},
{
"methodId": "03",
"method": "completeWrappedInstruction"
}
]
}
]
}
]
}

View File

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

View File

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

View File

@ -157,6 +157,13 @@ export const configMock = (): Config => {
rpcs: ["http://localhost"],
timeout: 10000,
},
"polygon-sepolia": {
name: "polygon-sepolia",
network: "sepolia",
chainId: 10007,
rpcs: ["http://localhost"],
timeout: 10000,
},
wormchain: {
name: "wormchain",
network: "testnet",

View File

@ -42,3 +42,4 @@ ARBITRUM_SEPOLIA_RPCS=
BASE_SEPOLIA_RPCS=
ETHEREUM_SEPOLIA_RPCS=
OPTIMISM_SEPOLIA_RPCS=
POLYGON_SEPOLIA_RPCS=

View File

@ -42,3 +42,4 @@ ARBITRUM_SEPOLIA_RPCS=
BASE_SEPOLIA_RPCS=
ETHEREUM_SEPOLIA_RPCS=
OPTIMISM_SEPOLIA_RPCS=
POLYGON_SEPOLIA_RPCS=

View File

@ -755,6 +755,10 @@ spec:
- name: APTOS_RPCS
value: '{{ .APTOS_RPCS }}'
{{ end }}
{{ if .ETHEREUM_SEPOLIA_RPCS }}
- name: ETHEREUM_SEPOLIA_RPCS
value: '{{ .ETHEREUM_SEPOLIA_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:

View File

@ -246,6 +246,36 @@ data:
}
]
},
{
"id": "poll-log-message-published-polygon-sepolia",
"chain": "polygon-sepolia",
"source": {
"action": "PollEvm",
"config": {
"blockBatchSize": 100,
"commitment": "latest",
"interval": 15000,
"addresses": ["0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],
"chain": "polygon-sepolia",
"chainId": 10007
}
},
"handlers": [
{
"action": "HandleEvmLogs",
"target": "sns",
"mapper": "evmLogMessagePublishedMapper",
"config": {
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
"filter": {
"addresses": ["0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
},
"metricName": "process_source_event"
}
}
]
},
{
"id": "poll-log-message-published-scroll",
"chain": "scroll",
@ -622,6 +652,14 @@ spec:
- name: SCROLL_RPCS
value: '{{ .SCROLL_RPCS }}'
{{ end }}
{{ if .POLYGON_SEPOLIA_RPCS }}
- name: POLYGON_SEPOLIA_RPCS
value: '{{ .POLYGON_SEPOLIA_RPCS }}'
{{ end }}
{{ if .ARBITRUM_SEPOLIA_RPCS }}
- name: ARBITRUM_SEPOLIA_RPCS
value: '{{ .ARBITRUM_SEPOLIA_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits:

View File

@ -259,6 +259,54 @@ data:
}
]
},
{
"id": "poll-redeemed-transactions-polygon-sepolia",
"chain": "polygon-sepolia",
"source": {
"action": "PollEvm",
"records": "GetEvmTransactions",
"config": {
"blockBatchSize": 100,
"commitment": "latest",
"interval": 5000,
"addresses": [
"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",
"0x23908A62110e21C04F3A4e011d24F901F911744A"
],
"chain": "polygon-sepolia",
"chainId": 10007,
"topics": [
"0x1b2a7ff080b8cb6ff436ce0372e399692bbfb6d4ae5766fd8d58a7b8cc6142e6",
"0xf02867db6908ee5f81fd178573ae9385837f0a0a72553f8c08306759a7e0f00e",
"0xbccc00b713f54173962e7de6098f643d8ebf53d488d71f4b2a5171496d038f9e",
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
},
"handlers": [
{
"action": "HandleEvmTransactions",
"target": "sns",
"mapper": "evmRedeemedTransactionFoundMapper",
"config": {
"abi": "",
"filter": {
"addresses": [
"0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e",
"0x23908A62110e21C04F3A4e011d24F901F911744A"
],
"topics": [
"0x1b2a7ff080b8cb6ff436ce0372e399692bbfb6d4ae5766fd8d58a7b8cc6142e6",
"0xf02867db6908ee5f81fd178573ae9385837f0a0a72553f8c08306759a7e0f00e",
"0xbccc00b713f54173962e7de6098f643d8ebf53d488d71f4b2a5171496d038f9e",
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
},
"metricName": "process_vaa_event"
}
}
]
},
{
"id": "poll-redeemed-transactions-avalanche",
"chain": "avalanche",
@ -1126,6 +1174,18 @@ spec:
- name: ETHEREUM_RPCS
value: '{{ .ETHEREUM_RPCS }}'
{{ end }}
{{ if .POLYGON_SEPOLIA_RPCS }}
- name: POLYGON_SEPOLIA_RPCS
value: '{{ .POLYGON_SEPOLIA_RPCS }}'
{{ end }}
{{ if .ETHEREUM_SEPOLIA_RPCS }}
- name: ETHEREUM_SEPOLIA_RPCS
value: '{{ .ETHEREUM_SEPOLIA_RPCS }}'
{{ end }}
{{ if .ARBITRUM_SEPOLIA_RPCS }}
- name: ARBITRUM_SEPOLIA_RPCS
value: '{{ .ARBITRUM_SEPOLIA_RPCS }}'
{{ end }}
image: {{ .IMAGE_NAME }}
resources:
limits: