diff --git a/databases/v9_global.db b/databases/v9_global.db new file mode 100644 index 0000000..fc2703d Binary files /dev/null and b/databases/v9_global.db differ diff --git a/tests/test_correct_entries.py b/tests/test_correct_entries.py index 738900d..b6eb827 100644 --- a/tests/test_correct_entries.py +++ b/tests/test_correct_entries.py @@ -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 @@ -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 \ No newline at end of file diff --git a/updates/23/asset_collections_mappings_updates.sql b/updates/23/asset_collections_mappings_updates.sql new file mode 100644 index 0000000..60f40e3 --- /dev/null +++ b/updates/23/asset_collections_mappings_updates.sql @@ -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"); +* \ No newline at end of file diff --git a/updates/23/asset_collections_updates.sql b/updates/23/asset_collections_updates.sql new file mode 100644 index 0000000..824f558 --- /dev/null +++ b/updates/23/asset_collections_updates.sql @@ -0,0 +1,2 @@ +INSERT INTO asset_collections(id, name, symbol) VALUES (261, "Starknet", "STRK"); +* \ No newline at end of file diff --git a/updates/23/updates.sql b/updates/23/updates.sql new file mode 100644 index 0000000..132e3d1 --- /dev/null +++ b/updates/23/updates.sql @@ -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); +* \ No newline at end of file diff --git a/updates/info.json b/updates/info.json index 91acb5c..cde17f2 100644 --- a/updates/info.json +++ b/updates/info.json @@ -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}}} \ No newline at end of file +{"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}}}