from ._typing import OnchainTxType

MINT_KECCAK = "0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde"
SWAP_KECCAK = "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67"
BURN_KECCAK = "0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c"
COLLECT_KECCAK = "0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0"

INCREASE_LIQUIDITY = "0x3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f"
DECREASE_LIQUIDITY = "0x26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b4"
COLLECT = "0x40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f01"

PROXY_CONTRACT_ADDRESS = "0xc36442b4a4522e871399cd717abdd847ab11fe88"

SUPPLY_KECCAK = "0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61"
WITHDRAW_KECCAK = "0x3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7"
BORROW_KECCAK = "0xb3d084820fb1a9decffb176436bd02558d15fac9b0ddfed8c465bc7359d7dce0"
REPAY_KECCAK = "0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051"
LIQUIDATION_KECCAK = "0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286"

TRANSFER_KECCAK = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"

type_dict = {
    MINT_KECCAK: OnchainTxType.MINT,
    SWAP_KECCAK: OnchainTxType.SWAP,
    BURN_KECCAK: OnchainTxType.BURN,
    COLLECT_KECCAK: OnchainTxType.COLLECT,
    SUPPLY_KECCAK: OnchainTxType.SUPPLY,
    WITHDRAW_KECCAK: OnchainTxType.WITHDRAW,
    BORROW_KECCAK: OnchainTxType.BORROW,
    REPAY_KECCAK: OnchainTxType.REPAY,
    LIQUIDATION_KECCAK: OnchainTxType.LIQUIDATION,
    TRANSFER_KECCAK: OnchainTxType.TRANSFER
}

topic_dict = {
    "0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde": "0x3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f",  # mint
    "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67": None,  # swap
    "0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c": "0x26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b4",  # burn
    "0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0": "0x40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f01",  # collect
}

AAVE_RESERVE_DATA_UPDATED_KECCAK = "0x804c9b842b2748a22bb64b345453a3de7ca54a6ca45ce00d415894979e22897a"
