Token-gate on the Front-end
Here is an example of a simple front end method, token gate the key functionality of your protocol with a check for our SBT:
const checkSBT = async () => {
try {
if (address) {
const isVerified = await checkForSBT(address);
if (isVerified) {
setIsAuth(true);
} else {
setIsAuth(false);
}
}
} catch (err) {
// handle error
}
};
Last updated