I cant seem to figure out whats going on? Ive been trying to create a transaction which sends ADA to a specified wallet address and can't seem to get it to work.
type Schema = Endpoint "storeFront" PaymentPubKeyHash payPubHash :: PaymentPubKeyHash payPubHash = "3f7846896a48c59359746ff096d63606ceb82e65900d20a9fd2b8a93" storeFront :: AsContractError e => Promise () Schema e () storeFront = endpoint @"storeFront" $ \(payPubHash) -> do unspentOutputs <- utxosAt contractAddress let tx = Constraints.mustPayToPubKey payPubHash (singleton adaSymbol adaToken 30000000) void $ submitTxConstraintsSpending storeContract unspentOutputs tx contract :: AsContractError e => Contract () Schema e () contract = storeFront endpoints :: AsContractError e => Contract () Schema e () endpoints = contract mkSchemaDefinitions ''Schema $(mkKnownCurrencies )
here's the error
Compilation Error, Line 93, Column 12 (jump) error: • Couldn't match expected type ‘Contract () Schema e ()’ with actual type ‘Promise () Schema e0 ()’ • In the expression: storeFront In an equation for ‘contract’: contract = storeFront • Relevant bindings include contract :: Contract () Schema e () (bound at /tmp/web-ghc-work-c17f548fe0e3f9c3/Main.hs:93:1) | 93 | contract = storeFront | ^^^^^^^^^^