I'm trying to make a simple function on the website. It should take amount of ETH as an input parameter and send it to a certain wallet. So it should have one placeholder for amount of ETH and "deposit" button.
I used Moralis to import the Connect Button. Now I can't figure out how to make a function.
I'm trying to follow instructions from moralis.io:
export default async function deposit(amount) {
const options = {type: "native", amount: Moralis.Units.ETH("amount"), receiver: "0x.."}
let result = await Moralis.transfer(options)
}
I'm very new to this.
Does this make any sense and how to make a front-end out of it?
Can someone help figure this one out?
Hi that
depositcode is a function. You then call it somewhere in your code to run it. E.g.I would recommend following an HTML/JavaScript course to learn the fundamentals, it will go a long way.