Skip to content

Add termmax adapter#1

Open
cp-weng-tkspring wants to merge 4 commits intomainfrom
termmax-adapter
Open

Add termmax adapter#1
cp-weng-tkspring wants to merge 4 commits intomainfrom
termmax-adapter

Conversation

@cp-weng-tkspring
Copy link
Copy Markdown
Collaborator

@cp-weng-tkspring cp-weng-tkspring commented Feb 24, 2025

The implementation refers to TempestCachedBalanceIntegration.

To test locally, use following configs:

class Chain(Enum):
    # ...
    HOLESKY_TESTNET = "Holesky"
CHAIN_TO_CONFIG_MAP = {
    # ...
    Chain.HOLESKY_TESTNET: {
        "data_manager_api_origin": "http://localhost:16000",
        "chain_id": "17000",
        "token_to_address_map": {
            Token.SUSDE: Web3.to_checksum_address(
                "0x278a2e385cacdb48df231bcc498c2de0cb0c9c20"
            ),
        },
    },
}
from constants.chains import Chain
from constants.termmax import TERMMAX_SUSDE_START_BLOCK
from integrations.integration_ids import IntegrationID
from integrations.termmax_susde import TermmaxCachedBalancesIntegration

integration = TermmaxCachedBalancesIntegration(
    integration_id=IntegrationID.TERMMAX_SUSDE,
    start_block=TERMMAX_SUSDE_START_BLOCK,
    chain=Chain.HOLESKY_TESTNET,
)
balances = integration.get_block_balances(cached_data={}, blocks=[3376954, 3382977])
print(balances)

cp-weng-tkspring pushed a commit that referenced this pull request Apr 14, 2025
refactor: use sentio for thala adapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant