On your website, you can install web3 that allow you to interact with your contract. You need to declare as constant :
- Smart contract Address
- Smart contract ABI
Then with web3 you can call any method.
You can add a private key into your web3 variable to sign transactions, but you can also just ask for an account so you will sign transaction with metamask or other wallet. Examble for web3.js method :
async function getCurrentAccount() {
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
return accounts[0];
}
async function withdraw() {
const account = await getCurrentAccount();
const doMethod = await MyContract.methods.withdraw().send({ from: account })
}