{
    "version": "0.1.0",
    "name": "flexlend",
    "instructions": [],
    "accounts": [
        {
            "name": "promotionAuthority",
            "type": {
                "kind": "struct",
                "fields": [
                    {
                        "name": "bump",
                        "type": "u8"
                    },
                    {
                        "name": "authoritySeed",
                        "docs": [
                            "keypair or timestamp or unique string etc"
                        ],
                        "type": {
                            "array": [
                                "u8",
                                19
                            ]
                        }
                    },
                    {
                        "name": "padding1",
                        "type": {
                            "array": [
                                "u8",
                                12
                            ]
                        }
                    },
                    {
                        "name": "mintAddress",
                        "docs": [
                            "flex user pda for current owner of the promotion"
                        ],
                        "type": "publicKey"
                    },
                    {
                        "name": "userAccount",
                        "type": "publicKey"
                    },
                    {
                        "name": "totalDeposits",
                        "type": "u64"
                    },
                    {
                        "name": "padding2",
                        "type": {
                            "array": [
                                "u64",
                                8
                            ]
                        }
                    }
                ]
            }
        },
        {
            "name": "userAccount",
            "type": {
                "kind": "struct",
                "fields": [
                    {
                        "name": "bump",
                        "type": "u8"
                    },
                    {
                        "name": "padding",
                        "type": {
                            "array": [
                                "u8",
                                7
                            ]
                        }
                    },
                    {
                        "name": "owner",
                        "type": "publicKey"
                    },
                    {
                        "name": "mfiAccount",
                        "type": "publicKey"
                    },
                    {
                        "name": "solendObligation",
                        "type": "publicKey"
                    },
                    {
                        "name": "promotionSeeds",
                        "type": {
                            "array": [
                                {
                                    "defined": "PromotionSeed"
                                },
                                4
                            ]
                        }
                    },
                    {
                        "name": "padding2",
                        "type": {
                            "array": [
                                "u64",
                                12
                            ]
                        }
                    }
                ]
            }
        }
    ],
    "types": [
        {
            "name": "PromotionSeed",
            "type": {
                "kind": "struct",
                "fields": [
                    {
                        "name": "authoritySeed",
                        "type": {
                            "array": [
                                "u8",
                                19
                            ]
                        }
                    },
                    {
                        "name": "padding",
                        "type": {
                            "array": [
                                "u8",
                                13
                            ]
                        }
                    }
                ]
            }
        }
    ],
    "events": [],
    "errors": [
        {
            "code": 6000,
            "name": "InvalidAllParameters",
            "msg": "Invalid all paramteres"
        },
        {
            "code": 6001,
            "name": "InvalidMigrationDestination",
            "msg": "Destination token account invalid for migration"
        },
        {
            "code": 6002,
            "name": "InvalidWithdrawDestination",
            "msg": "Destination token account invalid for withdraw"
        },
        {
            "code": 6003,
            "name": "MarginFiAccountAlreadyExists",
            "msg": "MarginFi account already exists for this Flex user"
        },
        {
            "code": 6004,
            "name": "InvalidAuthoritySeed",
            "msg": "Invalid authority seed"
        },
        {
            "code": 6005,
            "name": "OverflowError",
            "msg": "OverflowError"
        },
        {
            "code": 6006,
            "name": "UnderflowError",
            "msg": "UnderflowError"
        },
        {
            "code": 6007,
            "name": "PromotionSeedsLimitReached",
            "msg": "PromotionSeedsLimitReached"
        },
        {
            "code": 6008,
            "name": "InvalidTokenAmount",
            "msg": "Invliad token amount"
        }
    ]
}