Skip to content

Commit 17ae7b6

Browse files
committed
add avax support
1 parent 4e780e3 commit 17ae7b6

7 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
pip install poetry safety
2929
poetry config virtualenvs.in-project true
3030
- name: Install dependencies # install all dependencies
31-
run: poetry install
31+
run: poetry install --without dev
3232
- name: Pytest
3333
run: |
3434
poetry run coverage run -m --source=vertex_protocol pytest tests
@@ -62,7 +62,7 @@ jobs:
6262
pip install poetry safety
6363
poetry config virtualenvs.in-project true
6464
- name: Install dependencies # install all dependencies
65-
run: poetry install
65+
run: poetry install --without dev
6666
- name: Build and publish
6767
env:
6868
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}

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.2.1"
3+
version = "3.3.0"
44
description = "Vertex Protocol SDK"
55
authors = ["Jeury Mejia <jeury@vertexprotocol.com>"]
66
homepage = "https://vertexprotocol.com/"

vertex_protocol/client/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class VertexClientMode(StrEnum):
3232
SONIC_MAINNET: For operating in Vertex's mainnet environment deployed on Sonic Mainnet.
3333
ABSTRACT_MAINNET: For operating in Vertex's mainnet environment deployed on Abstract Mainnet.
3434
BERA_MAINNET: For operating in Vertex's mainnet environment deployed on Berachain Mainnet.
35+
AVAX_MAINNET: For operating in Vertex's mainnet environment deployed on Avalanche Mainnet.
3536
3637
SEPOLIA_TESTNET: For operating in Vertex's testnet environment deployed on Arbitrum Sepolia.
3738
BLAST_TESTNET: For operating in Vertex's testnet environment deployed on Blast Testnet.
@@ -40,6 +41,7 @@ class VertexClientMode(StrEnum):
4041
BASE_TESTNET: For operating in Vertex's testnet environment deployed on Base Testnet.
4142
SONIC_TESTNET: For operating in Vertex's testnet environment deployed on Sonic Testnet.
4243
ABSTRACT_TESTNET: For operating in Vertex's testnet environment deployed on Abstract Testnet.
44+
AVAX_TESTNET: For operating in Vertex's testnet environment deployed on Avalanche Testnet.
4345
4446
DEVNET: For local development.
4547
@@ -55,6 +57,7 @@ class VertexClientMode(StrEnum):
5557
SONIC_MAINNET = "sonic-mainnet"
5658
ABSTRACT_MAINNET = "abstract-mainnet"
5759
BERA_MAINNET = "bera-mainnet"
60+
AVAX_MAINNET = "avax-mainnet"
5861

5962
# testnet
6063
SEPOLIA_TESTNET = "sepolia-testnet"
@@ -64,6 +67,7 @@ class VertexClientMode(StrEnum):
6467
BASE_TESTNET = "base-testnet"
6568
SONIC_TESTNET = "sonic-testnet"
6669
ABSTRACT_TESTNET = "abstract-testnet"
70+
AVAX_TESTNET = "avax-testnet"
6771

6872
# dev
6973
DEVNET = "devnet"
@@ -242,6 +246,12 @@ def client_mode_to_setup(
242246
VertexBackendURL.BASE_MAINNET_TRIGGER.value,
243247
VertexNetwork.BASE_MAINNET.value,
244248
),
249+
VertexClientMode.AVAX_MAINNET: (
250+
VertexBackendURL.AVAX_MAINNET_GATEWAY.value,
251+
VertexBackendURL.AVAX_MAINNET_INDEXER.value,
252+
VertexBackendURL.AVAX_MAINNET_TRIGGER.value,
253+
VertexNetwork.AVAX_MAINNET.value,
254+
),
245255
VertexClientMode.SONIC_MAINNET: (
246256
VertexBackendURL.SONIC_MAINNET_GATEWAY.value,
247257
VertexBackendURL.SONIC_MAINNET_INDEXER.value,
@@ -302,6 +312,12 @@ def client_mode_to_setup(
302312
VertexBackendURL.ABSTRACT_TESTNET_TRIGGER.value,
303313
VertexNetwork.ABSTRACT_TESTNET.value,
304314
),
315+
VertexClientMode.AVAX_TESTNET: (
316+
VertexBackendURL.AVAX_TESTNET_GATEWAY.value,
317+
VertexBackendURL.AVAX_TESTNET_INDEXER.value,
318+
VertexBackendURL.AVAX_TESTNET_TRIGGER.value,
319+
VertexNetwork.AVAX_TESTNET.value,
320+
),
305321
VertexClientMode.DEVNET: (
306322
VertexBackendURL.DEVNET_GATEWAY.value,
307323
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.avax.network/ext/bc/C/rpc",
3+
"explorerUrl": "https://snowtrace.io",
4+
"startBlock": 59043939,
5+
"deployer": "0xB398aE762e9d788e30F430C013f4de46D96794D8",
6+
"quote": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
7+
"querier": "0xc523008CE1D7a5f4cc9f0a9a9c973aA19bE054BC",
8+
"clearinghouse": "0x7069798A5714c5833E36e70df8AeFAac7CEC9302",
9+
"endpoint": "0x36dc76c0C8FC6B4fFe73178C351BA5a3F2178eb3",
10+
"spotEngine": "0xCf0934104391eD43685Ae6aBf24F7CdE93F3Dfa8",
11+
"perpEngine": "0x207c0ef981b4F1FBDfccA88F025C917cFdF1e7C5",
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.avax-test.network/ext/bc/C/rpc",
3+
"explorerUrl": "https://subnets-test.avax.network/c-chain",
4+
"startBlock": 38008561,
5+
"deployer": "0x3c06e307BA6Ab81E8Ff6661c1559ce8027744AE5",
6+
"quote": "0x94B3173E0a23C28b2BA9a52464AC24c2B032791c",
7+
"querier": "0x611A1Bf97B94A526a23Bb11cE12341884f8F6Fe0",
8+
"clearinghouse": "0x08F44516d84Eb6D0f057b1Dd198B928aa7191AbD",
9+
"endpoint": "0x1a77cB939B7C4fA5Cc90b09787260DABf5f05c41",
10+
"spotEngine": "0xA1DbC395Cbaa8c7b74456697C42ADa8F2b08CAbb",
11+
"perpEngine": "0xEC1149dF1559eaDB0Af4cf6d9BeAc7a08Aa9f694",
12+
"vrtxAirdrop": "0x0000000000000000000000000000000000000000",
13+
"vrtxStaking": "0x0000000000000000000000000000000000000000",
14+
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
15+
}

vertex_protocol/contracts/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class VertexNetwork(StrEnum):
1919
SONIC_MAINNET = "sonicMainnet"
2020
ABSTRACT_MAINNET = "abstractMainnet"
2121
BERA_MAINNET = "beraMainnet"
22+
AVAX_MAINNET = "avaxMainnet"
2223

2324
# testnet
2425
ARBITRUM_SEPOLIA = "arbitrumSepolia"
@@ -28,6 +29,7 @@ class VertexNetwork(StrEnum):
2829
BASE_TESTNET = "baseTestnet"
2930
SONIC_TESTNET = "sonicTestnet"
3031
ABSTRACT_TESTNET = "abstractTestnet"
32+
AVAX_TESTNET = "avaxTestnet"
3133

3234
# dev
3335
HARDHAT = "localhost"

vertex_protocol/utils/backend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class VertexBackendURL(StrEnum):
4141
BERA_MAINNET_INDEXER = "https://archive.bera-prod.vertexprotocol.com/v1"
4242
BERA_MAINNET_TRIGGER = "https://trigger.bera-prod.vertexprotocol.com/v1"
4343

44+
AVAX_MAINNET_GATEWAY = "https://gateway.avax-prod.vertexprotocol.com/v1"
45+
AVAX_MAINNET_INDEXER = "https://archive.avax-prod.vertexprotocol.com/v1"
46+
AVAX_MAINNET_TRIGGER = "https://trigger.avax-prod.vertexprotocol.com/v1"
47+
4448
# testnet
4549
SEPOLIA_TESTNET_GATEWAY = "https://gateway.sepolia-test.vertexprotocol.com/v1"
4650
SEPOLIA_TESTNET_INDEXER = "https://archive.sepolia-test.vertexprotocol.com/v1"
@@ -70,6 +74,10 @@ class VertexBackendURL(StrEnum):
7074
ABSTRACT_TESTNET_INDEXER = "https://archive.abstract-test.vertexprotocol.com/v1"
7175
ABSTRACT_TESTNET_TRIGGER = "https://trigger.abstract-test.vertexprotocol.com/v1"
7276

77+
AVAX_TESTNET_GATEWAY = "https://gateway.avax-test.vertexprotocol.com/v1"
78+
AVAX_TESTNET_INDEXER = "https://archive.avax-test.vertexprotocol.com/v1"
79+
AVAX_TESTNET_TRIGGER = "https://trigger.avax-test.vertexprotocol.com/v1"
80+
7381
# dev
7482
DEVNET_GATEWAY = "http://localhost:80"
7583
DEVNET_INDEXER = "http://localhost:8000"

0 commit comments

Comments
 (0)