(define-constant ERR_INPUT_VERSION_NOT_SUPPORTED u0)

(define-public (get-nothing)
    (contract-call? 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.wrapped-nothing-v8 
        transfer u100000 
        (as-contract tx-sender) 
        contract-caller 
        none
    )
)

(define-public (convert-to-v8 (inputVersion uint) (amount uint))
    (begin 
        (if (is-eq inputVersion u5)
            (begin
                (contract-call? 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.wrapped-nothing-v5
                    unwrap amount
                )
                (wrap-mno-to-v8 amount)
            )
            (if (is-eq inputVersion u6)
                (begin
                    (contract-call? 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.wrapped-nothing-v6
                        unwrap amount
                    )
                    (wrap-mno-to-v8 amount)
                )
                (if (is-eq inputVersion u7)
                    (begin
                        (contract-call? 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.wrapped-nothing-v7
                            unwrap amount
                        )
                        (wrap-mno-to-v8 amount)
                    )
                    (err ERR_INPUT_VERSION_NOT_SUPPORTED)
                )
            )
        )
    )
)

(define-private (wrap-mno-to-v8 (amount uint))
    (contract-call? 'SP32AEEF6WW5Y0NMJ1S8SBSZDAY8R5J32NBZFPKKZ.wrapped-nothing-v8
        wrap-nthng amount
    )
)