Skip to content

Commit 64757af

Browse files
authored
chore: abstract support (#119)
1 parent 4a33ff9 commit 64757af

6 files changed

Lines changed: 73 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vertex-protocol"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
description = "Vertex Protocol SDK"
55
authors = ["Jeury Mejia <jeury@vertexprotocol.com>"]
66
homepage = "https://vertexprotocol.com/"

vertex_protocol/client/__init__.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class VertexClientMode(StrEnum):
3636
3737
SONIC_MAINNET: For operating in Vertex's mainnet environment deployed on Sonic Mainnet.
3838
39+
ABSTRACT_MAINNET: For operating in Vertex's mainnet environment deployed on Abstract Mainnet.
40+
3941
SEPOLIA_TESTNET: For operating in Vertex's testnet environment deployed on Arbitrum Sepolia.
4042
4143
BLAST_TESTNET: For operating in Vertex's testnet environment deployed on Blast Testnet.
@@ -46,25 +48,34 @@ class VertexClientMode(StrEnum):
4648
4749
BASE_TESTNET: For operating in Vertex's testnet environment deployed on Base Testnet.
4850
49-
SONIC_TESTNET: For operating in Vertex's mainnet environment deployed on Sonic Testnet.
51+
SONIC_TESTNET: For operating in Vertex's testnet environment deployed on Sonic Testnet.
52+
53+
ABSTRACT_TESTNET: For operating in Vertex's testnet environment deployed on Abstract Testnet.
5054
5155
DEVNET: For local development.
5256
5357
TESTING: For running tests.
5458
"""
5559

60+
# mainnet
5661
MAINNET = "mainnet"
5762
BLAST_MAINNET = "blast-mainnet"
5863
MANTLE_MAINNET = "mantle-mainnet"
5964
SEI_MAINNET = "sei-mainnet"
6065
BASE_MAINNET = "base-mainnet"
6166
SONIC_MAINNET = "sonic-mainnet"
67+
ABSTRACT_MAINNET = "abstract-mainnet"
68+
69+
# testnet
6270
SEPOLIA_TESTNET = "sepolia-testnet"
6371
BLAST_TESTNET = "blast-testnet"
6472
MANTLE_TESTNET = "mantle-testnet"
6573
SEI_TESTNET = "sei-testnet"
6674
BASE_TESTNET = "base-testnet"
6775
SONIC_TESTNET = "sonic-testnet"
76+
ABSTRACT_TESTNET = "abstract-testnet"
77+
78+
# dev
6879
DEVNET = "devnet"
6980
TESTING = "testing"
7081

@@ -247,6 +258,12 @@ def client_mode_to_setup(
247258
VertexBackendURL.SONIC_MAINNET_TRIGGER.value,
248259
VertexNetwork.SONIC_MAINNET.value,
249260
),
261+
VertexClientMode.ABSTRACT_MAINNET: (
262+
VertexBackendURL.ABSTRACT_MAINNET_GATEWAY.value,
263+
VertexBackendURL.ABSTRACT_MAINNET_INDEXER.value,
264+
VertexBackendURL.ABSTRACT_MAINNET_TRIGGER.value,
265+
VertexNetwork.ABSTRACT_MAINNET.value,
266+
),
250267
VertexClientMode.SEPOLIA_TESTNET: (
251268
VertexBackendURL.SEPOLIA_TESTNET_GATEWAY.value,
252269
VertexBackendURL.SEPOLIA_TESTNET_INDEXER.value,
@@ -283,6 +300,12 @@ def client_mode_to_setup(
283300
VertexBackendURL.SONIC_TESTNET_TRIGGER.value,
284301
VertexNetwork.SONIC_TESTNET.value,
285302
),
303+
VertexClientMode.ABSTRACT_TESTNET: (
304+
VertexBackendURL.ABSTRACT_TESTNET_GATEWAY.value,
305+
VertexBackendURL.ABSTRACT_TESTNET_INDEXER.value,
306+
VertexBackendURL.ABSTRACT_TESTNET_TRIGGER.value,
307+
VertexNetwork.ABSTRACT_TESTNET.value,
308+
),
286309
VertexClientMode.DEVNET: (
287310
VertexBackendURL.DEVNET_GATEWAY.value,
288311
VertexBackendURL.DEVNET_INDEXER.value,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"publicNodeUrl": "https://api.mainnet.abs.xyz",
3+
"explorerUrl": "https://abscan.org",
4+
"startBlock": 410000,
5+
"deployer": "0x184d0842a2C19fB003D0d12C7dFcCc52dBD608F5",
6+
"quote": "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1",
7+
"querier": "0xC155f48b8212a7Dd16B336f1891c8E26D5DFE093",
8+
"clearinghouse": "0x1385bF2f06165cA0621aF047cF8666c256e1B1C2",
9+
"endpoint": "0x6B104c78D384D1C25CcEe2CA0698541e22eC60b2",
10+
"spotEngine": "0xA65B7Ae7A3a17B93dc382fA1487b4bc3BCEB6e3D",
11+
"perpEngine": "0x6950DD3d2da0cdc217ad56714c6BA0011171bcC4",
12+
"vrtxAirdrop": "0x0000000000000000000000000000000000000000",
13+
"vrtxStaking": "0x0000000000000000000000000000000000000000",
14+
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"publicNodeUrl": "https://api.testnet.abs.xyz",
3+
"explorerUrl": "https://explorer.testnet.abs.xyz",
4+
"startBlock": 3899928,
5+
"deployer": "0x3c06e307BA6Ab81E8Ff6661c1559ce8027744AE5",
6+
"quote": "0xbf9ac1Bff961F513fc26ba2734cB0aB371FD27e7",
7+
"querier": "0xfE8942db6a40dF41e5EFec71Db248199D1452d60",
8+
"clearinghouse": "0x96d143992dfEAd13502a68BfE714c7712bA659bA",
9+
"endpoint": "0x597c7D7b33a8b0A73e929BA97814d8b35910D98E",
10+
"spotEngine": "0x9b1232D7AdC1879c69892A0454c6Fee9DfdC1805",
11+
"perpEngine": "0x90520E2159078C2BcF1dD653568951E0ea0767CB",
12+
"vrtxAirdrop": "0x0000000000000000000000000000000000000000",
13+
"vrtxStaking": "0x0000000000000000000000000000000000000000",
14+
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
15+
}

vertex_protocol/contracts/types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,25 @@ class VertexNetwork(StrEnum):
1010
Enumeration representing various network environments for the Vertex protocol.
1111
"""
1212

13+
# mainnet
1314
ARBITRUM_ONE = "arbitrumOne"
1415
BLAST_MAINNET = "blastMainnet"
1516
MANTLE_MAINNET = "mantleMainnet"
1617
SEI_MAINNET = "seiMainnet"
1718
BASE_MAINNET = "baseMainnet"
1819
SONIC_MAINNET = "sonicMainnet"
20+
ABSTRACT_MAINNET = "abstractMainnet"
21+
22+
# testnet
1923
ARBITRUM_SEPOLIA = "arbitrumSepolia"
2024
BLAST_TESTNET = "blastTestnet"
2125
MANTLE_TESTNET = "mantleTestnet"
2226
SEI_TESTNET = "seiTestnet"
2327
BASE_TESTNET = "baseTestnet"
2428
SONIC_TESTNET = "sonicTestnet"
29+
ABSTRACT_TESTNET = "abstractTestnet"
30+
31+
# dev
2532
HARDHAT = "localhost"
2633
TESTING = "test"
2734

vertex_protocol/utils/backend.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class VertexBackendURL(StrEnum):
99
"""Enum representing different Vertex backend URLs."""
1010

11+
# mainnet
1112
MAINNET_GATEWAY = "https://gateway.prod.vertexprotocol.com/v1"
1213
MAINNET_INDEXER = "https://archive.prod.vertexprotocol.com/v1"
1314
MAINNET_TRIGGER = "https://trigger.prod.vertexprotocol.com/v1"
@@ -32,6 +33,11 @@ class VertexBackendURL(StrEnum):
3233
SONIC_MAINNET_INDEXER = "https://archive.sonic-prod.vertexprotocol.com/v1"
3334
SONIC_MAINNET_TRIGGER = "https://trigger.sonic-prod.vertexprotocol.com/v1"
3435

36+
ABSTRACT_MAINNET_GATEWAY = "https://gateway.abstract-prod.vertexprotocol.com/v1"
37+
ABSTRACT_MAINNET_INDEXER = "https://archive.abstract-prod.vertexprotocol.com/v1"
38+
ABSTRACT_MAINNET_TRIGGER = "https://trigger.abstract-prod.vertexprotocol.com/v1"
39+
40+
# testnet
3541
SEPOLIA_TESTNET_GATEWAY = "https://gateway.sepolia-test.vertexprotocol.com/v1"
3642
SEPOLIA_TESTNET_INDEXER = "https://archive.sepolia-test.vertexprotocol.com/v1"
3743
SEPOLIA_TESTNET_TRIGGER = "https://trigger.sepolia-test.vertexprotocol.com/v1"
@@ -56,6 +62,11 @@ class VertexBackendURL(StrEnum):
5662
SONIC_TESTNET_INDEXER = "https://archive.sonic-test.vertexprotocol.com/v1"
5763
SONIC_TESTNET_TRIGGER = "https://trigger.sonic-test.vertexprotocol.com/v1"
5864

65+
ABSTRACT_TESTNET_GATEWAY = "https://gateway.abstract-test.vertexprotocol.com/v1"
66+
ABSTRACT_TESTNET_INDEXER = "https://archive.abstract-test.vertexprotocol.com/v1"
67+
ABSTRACT_TESTNET_TRIGGER = "https://trigger.abstract-test.vertexprotocol.com/v1"
68+
69+
# dev
5970
DEVNET_GATEWAY = "http://localhost:80"
6071
DEVNET_INDEXER = "http://localhost:8000"
6172
DEVNET_TRIGGER = "http://localhost:8080"

0 commit comments

Comments
 (0)