Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add termmax adapter #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add termmax adapter #1

wants to merge 2 commits into from

Conversation

cp-weng-tkspring
Copy link
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)

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