Skip to content

Commit

Permalink
chore: add base support (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
yruej301 authored Sep 5, 2024
1 parent e6668d0 commit 60b6313
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vertex-protocol"
version = "2.1.4"
version = "2.1.5"
description = "Vertex Protocol SDK"
authors = ["Jeury Mejia <jeury@vertexprotocol.com>"]
homepage = "https://vertexprotocol.com/"
Expand Down
16 changes: 16 additions & 0 deletions vertex_protocol/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class VertexClientMode(StrEnum):
SEI_MAINNET: For operating in Vertex's mainnet environment deployed on Sei Mainnet.
BASE_MAINNET: For operating in Vertex's mainnet environment deployed on Base Mainnet.
SEPOLIA_TESTNET: For operating in Vertex's testnet environment deployed on Arbitrum Sepolia.
BLAST_TESTNET: For operating in Vertex's testnet environment deployed on Blast Testnet.
Expand All @@ -41,6 +43,8 @@ class VertexClientMode(StrEnum):
SEI_TESTNET: For operating in Vertex's testnet environment deployed on Sei Testnet.
BASE_TESTNET: For operating in Vertex's testnet environment deployed on Base Testnet.
DEVNET: For local development.
TESTING: For running tests.
Expand All @@ -50,10 +54,12 @@ class VertexClientMode(StrEnum):
BLAST_MAINNET = "blast-mainnet"
MANTLE_MAINNET = "mantle-mainnet"
SEI_MAINNET = "sei-mainnet"
BASE_MAINNET = "base-mainnet"
SEPOLIA_TESTNET = "sepolia-testnet"
BLAST_TESTNET = "blast-testnet"
MANTLE_TESTNET = "mantle-testnet"
SEI_TESTNET = "sei-testnet"
BASE_TESTNET = "base-testnet"
DEVNET = "devnet"
TESTING = "testing"

Expand Down Expand Up @@ -211,6 +217,11 @@ def client_mode_to_setup(
VertexBackendURL.SEI_MAINNET_INDEXER.value,
VertexNetwork.SEI_MAINNET.value,
),
VertexClientMode.BASE_MAINNET: (
VertexBackendURL.BASE_MAINNET_GATEWAY.value,
VertexBackendURL.BASE_MAINNET_INDEXER.value,
VertexNetwork.BASE_MAINNET.value,
),
VertexClientMode.SEPOLIA_TESTNET: (
VertexBackendURL.SEPOLIA_TESTNET_GATEWAY.value,
VertexBackendURL.SEPOLIA_TESTNET_INDEXER.value,
Expand All @@ -231,6 +242,11 @@ def client_mode_to_setup(
VertexBackendURL.SEI_TESTNET_INDEXER.value,
VertexNetwork.SEI_TESTNET.value,
),
VertexClientMode.BASE_TESTNET: (
VertexBackendURL.BASE_TESTNET_GATEWAY.value,
VertexBackendURL.BASE_TESTNET_INDEXER.value,
VertexNetwork.BASE_TESTNET.value,
),
VertexClientMode.DEVNET: (
VertexBackendURL.DEVNET_GATEWAY.value,
VertexBackendURL.DEVNET_INDEXER.value,
Expand Down
15 changes: 15 additions & 0 deletions vertex_protocol/contracts/deployments/deployment.baseMainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"publicNodeUrl": "https://mainnet.base.org",
"explorerUrl": "https://basescan.org",
"startBlock": 19343662,
"deployer": "0xeCe5f68E5faE5cff2F231c185aC4db83d50aBe0c",
"quote": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"querier": "0x57237f44e893468efDD568cA7dE1EA8A57d14c1b",
"clearinghouse": "0xE46Cb729F92D287F6459bDA6899434E22eCC48AE",
"endpoint": "0x92C2201D48481e2d42772Da02485084A4407Bbe2",
"spotEngine": "0xe818be1DA4E53763bC77df904aD1B5A1C5A61626",
"perpEngine": "0x5BD184F408932F9E6bA00e44A071bCCb8977fb47",
"vrtxAirdrop": "0x0000000000000000000000000000000000000000",
"vrtxStaking": "0x0000000000000000000000000000000000000000",
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
}
15 changes: 15 additions & 0 deletions vertex_protocol/contracts/deployments/deployment.baseTestnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"publicNodeUrl": "https://sepolia.base.org",
"explorerUrl": "https://sepolia-explorer.base.org",
"startBlock": 14467784,
"deployer": "0x3c06e307BA6Ab81E8Ff6661c1559ce8027744AE5",
"quote": "0xbC47901f4d2C5fc871ae0037Ea05c3F614690781",
"querier": "0xFD496f151c60d72DFAfF371e524829565C194D7A",
"clearinghouse": "0x0751C5360A418ff3cFe90B7A61199067f3b39ab5",
"endpoint": "0x08F44516d84Eb6D0f057b1Dd198B928aa7191AbD",
"spotEngine": "0xB61B069d741C98DA3302986BF107aA9083b64133",
"perpEngine": "0xA1DbC395Cbaa8c7b74456697C42ADa8F2b08CAbb",
"vrtxAirdrop": "0x0000000000000000000000000000000000000000",
"vrtxStaking": "0x0000000000000000000000000000000000000000",
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
}
2 changes: 2 additions & 0 deletions vertex_protocol/contracts/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ class VertexNetwork(StrEnum):
BLAST_MAINNET = "blastMainnet"
MANTLE_MAINNET = "mantleMainnet"
SEI_MAINNET = "seiMainnet"
BASE_MAINNET = "baseMainnet"
ARBITRUM_SEPOLIA = "arbitrumSepolia"
BLAST_TESTNET = "blastTestnet"
MANTLE_TESTNET = "mantleTestnet"
SEI_TESTNET = "seiTestnet"
BASE_TESTNET = "baseTestnet"
HARDHAT = "localhost"
TESTING = "test"

Expand Down
6 changes: 6 additions & 0 deletions vertex_protocol/utils/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class VertexBackendURL(StrEnum):
SEI_MAINNET_GATEWAY = "https://gateway.sei-prod.vertexprotocol.com/v1"
SEI_MAINNET_INDEXER = "https://archive.sei-prod.vertexprotocol.com/v1"

BASE_MAINNET_GATEWAY = "https://gateway.base-prod.vertexprotocol.com/v1"
BASE_MAINNET_INDEXER = "https://archive.base-prod.vertexprotocol.com/v1"

SEPOLIA_TESTNET_GATEWAY = "https://gateway.sepolia-test.vertexprotocol.com/v1"
SEPOLIA_TESTNET_INDEXER = "https://archive.sepolia-test.vertexprotocol.com/v1"

Expand All @@ -28,5 +31,8 @@ class VertexBackendURL(StrEnum):
SEI_TESTNET_GATEWAY = "https://gateway.sei-test.vertexprotocol.com/v1"
SEI_TESTNET_INDEXER = "https://archive.sei-test.vertexprotocol.com/v1"

BASE_TESTNET_GATEWAY = "https://gateway.base-test.vertexprotocol.com/v1"
BASE_TESTNET_INDEXER = "https://archive.base-test.vertexprotocol.com/v1"

DEVNET_GATEWAY = "http://localhost:80"
DEVNET_INDEXER = "http://localhost:8000"

0 comments on commit 60b6313

Please sign in to comment.