Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Signed-off-by: Lefteris Karapetsas <[email protected]>
  • Loading branch information
LefterisJP committed Feb 23, 2024
2 parents 2d32f50 + 7db9ca6 commit 859b8f3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
Binary file added databases/v9_global.db
Binary file not shown.
8 changes: 7 additions & 1 deletion tests/test_correct_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import pytest
from eth_utils.address import to_checksum_address
import warnings

from validator.checker import UpdateChecker
from validator.utils import get_latest_version
Expand Down Expand Up @@ -47,6 +48,11 @@ def test_valid_identifiers_mappings(version, schema_versions):
if '*' in line:
continue
print('---', line)
eip_pos = line.index('eip155')
try:
eip_pos = line.index('eip155')
except ValueError:
warnings.warn(f'Non evm mapping: {line}')
continue

address = line[eip_pos:].split(':')[-1].strip().replace('");', '')
assert to_checksum_address(address) == address
8 changes: 8 additions & 0 deletions updates/23/asset_collections_mappings_updates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
INSERT INTO multiasset_mappings(collection_id, asset) VALUES (261, "eip155:1/erc20:0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766");
*
INSERT INTO multiasset_mappings(collection_id, asset) VALUES (261, "STRK");
*
INSERT INTO multiasset_mappings(collection_id, asset) VALUES (217, "eip155:100/erc20:0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6");
*
INSERT INTO multiasset_mappings(collection_id, asset) VALUES (248, "eip155:42161/erc20:0x1509706a6c66CA549ff0cB464de88231DDBe213B");
*
2 changes: 2 additions & 0 deletions updates/23/asset_collections_updates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO asset_collections(id, name, symbol) VALUES (261, "Starknet", "STRK");
*
8 changes: 8 additions & 0 deletions updates/23/updates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
INSERT INTO assets(identifier, name, type) VALUES("eip155:1/erc20:0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766", "Starknet Token", "C"); INSERT INTO evm_tokens(identifier, token_kind, chain, address, decimals, protocol) VALUES("eip155:1/erc20:0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766", "A", 1, "0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766", 18, NULL); INSERT INTO common_asset_details(identifier, symbol, coingecko, cryptocompare, forked, started, swapped_for) VALUES("eip155:1/erc20:0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766", "STRK", "starknet", "", NULL, 1668610211, NULL);
*
INSERT INTO assets(identifier, name, type) VALUES("STRK", "Starknet", "W"); INSERT INTO common_asset_details(identifier, symbol, coingecko, cryptocompare, forked, started, swapped_for) VALUES("STRK", "STRK", "starknet", "", NULL, 1668610211, NULL);
*
INSERT INTO assets(identifier, name, type) VALUES("eip155:100/erc20:0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6", "Wrapped liquid staked Ether 2.0 from Mainnet", "C"); INSERT INTO evm_tokens(identifier, token_kind, chain, address, decimals, protocol) VALUES("eip155:100/erc20:0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6", "A", 100, "0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6", 18, NULL); INSERT INTO common_asset_details(identifier, symbol, coingecko, cryptocompare, forked, started, swapped_for) VALUES("eip155:100/erc20:0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6", "wstETH", "wrapped-steth", "WSTETH", NULL, 1675777350, NULL);
*
INSERT INTO assets(identifier, name, type) VALUES("eip155:42161/erc20:0x1509706a6c66CA549ff0cB464de88231DDBe213B", "Aura", "C"); INSERT INTO evm_tokens(identifier, token_kind, chain, address, decimals, protocol) VALUES("eip155:42161/erc20:0x1509706a6c66CA549ff0cB464de88231DDBe213B", "A", 42161, "0x1509706a6c66CA549ff0cB464de88231DDBe213B", 18, NULL); INSERT INTO common_asset_details(identifier, symbol, coingecko, cryptocompare, forked, started, swapped_for) VALUES("eip155:42161/erc20:0x1509706a6c66CA549ff0cB464de88231DDBe213B", "AURA", "aura-finance", "AURA", NULL, 1686742265, NULL);
*
2 changes: 1 addition & 1 deletion updates/info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"latest": 22, "updates": {"1": {"changes": 249, "max_schema_version": 2, "min_schema_version": 2}, "10": {"changes": 30, "max_schema_version": 2, "min_schema_version": 2}, "11": {"changes": 71, "max_schema_version": 2, "min_schema_version": 2}, "12": {"changes": 174, "max_schema_version": 2, "min_schema_version": 2}, "13": {"changes": 311, "max_schema_version": 2, "min_schema_version": 2}, "14": {"changes": 94, "max_schema_version": 2, "min_schema_version": 2}, "15": {"changes": 116, "max_schema_version": 4, "min_schema_version": 3}, "16": {"changes": 153, "max_schema_version": 6, "min_schema_version": 4}, "17": {"changes": 137, "max_schema_version": 6, "min_schema_version": 4}, "18": {"changes": 189, "max_schema_version": 6, "min_schema_version": 4}, "19": {"changes": 183, "max_schema_version": 6, "min_schema_version": 4}, "20": {"changes": 105, "max_schema_version": 6, "min_schema_version": 4}, "21": {"changes": 46, "max_schema_version": 6, "min_schema_version": 6}, "22": {"changes": 145, "max_schema_version": 6, "min_schema_version": 6}, "2": {"changes": 27, "max_schema_version": 2, "min_schema_version": 2}, "3": {"changes": 64, "max_schema_version": 2, "min_schema_version": 2}, "4": {"changes": 23, "max_schema_version": 2, "min_schema_version": 2}, "5": {"changes": 25, "max_schema_version": 2, "min_schema_version": 2}, "6": {"changes": 239, "max_schema_version": 2, "min_schema_version": 2}, "7": {"changes": 34, "max_schema_version": 2, "min_schema_version": 2}, "8": {"changes": 81, "max_schema_version": 2, "min_schema_version": 2}, "9": {"changes": 59, "max_schema_version": 2, "min_schema_version": 2}}}
{"latest": 23, "updates": {"1": {"changes": 249, "max_schema_version": 2, "min_schema_version": 2}, "10": {"changes": 30, "max_schema_version": 2, "min_schema_version": 2}, "11": {"changes": 71, "max_schema_version": 2, "min_schema_version": 2}, "12": {"changes": 174, "max_schema_version": 2, "min_schema_version": 2}, "13": {"changes": 311, "max_schema_version": 2, "min_schema_version": 2}, "14": {"changes": 94, "max_schema_version": 2, "min_schema_version": 2}, "15": {"changes": 116, "max_schema_version": 4, "min_schema_version": 3}, "16": {"changes": 153, "max_schema_version": 6, "min_schema_version": 4}, "17": {"changes": 137, "max_schema_version": 6, "min_schema_version": 4}, "18": {"changes": 189, "max_schema_version": 6, "min_schema_version": 4}, "19": {"changes": 183, "max_schema_version": 6, "min_schema_version": 4}, "20": {"changes": 105, "max_schema_version": 6, "min_schema_version": 4}, "21": {"changes": 46, "max_schema_version": 6, "min_schema_version": 6}, "22": {"changes": 145, "max_schema_version": 6, "min_schema_version": 6}, "23": {"changes": 4, "max_schema_version": 6, "min_schema_version": 6}, "2": {"changes": 27, "max_schema_version": 2, "min_schema_version": 2}, "3": {"changes": 64, "max_schema_version": 2, "min_schema_version": 2}, "4": {"changes": 23, "max_schema_version": 2, "min_schema_version": 2}, "5": {"changes": 25, "max_schema_version": 2, "min_schema_version": 2}, "6": {"changes": 239, "max_schema_version": 2, "min_schema_version": 2}, "7": {"changes": 34, "max_schema_version": 2, "min_schema_version": 2}, "8": {"changes": 81, "max_schema_version": 2, "min_schema_version": 2}, "9": {"changes": 59, "max_schema_version": 2, "min_schema_version": 2}}}

0 comments on commit 859b8f3

Please sign in to comment.